Skip to content
This repository was archived by the owner on Mar 28, 2020. It is now read-only.

Commit e57e8cc

Browse files
committed
[X86] Use LoadInst->getType() instead of LoadInst->getPointerOperandType()->getElementType(). NFCI
For the future day when the pointer's don't have element types, we shoudl just use the type of the load result instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356721 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 49e23dc commit e57e8cc

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/Target/X86/X86ISelLowering.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25497,9 +25497,8 @@ bool X86TargetLowering::shouldExpandAtomicStoreInIR(StoreInst *SI) const {
2549725497
// FIXME: On 32 bits x86, fild/movq might be faster than lock cmpxchg8b.
2549825498
TargetLowering::AtomicExpansionKind
2549925499
X86TargetLowering::shouldExpandAtomicLoadInIR(LoadInst *LI) const {
25500-
auto PTy = cast<PointerType>(LI->getPointerOperandType());
25501-
return needsCmpXchgNb(PTy->getElementType()) ? AtomicExpansionKind::CmpXChg
25502-
: AtomicExpansionKind::None;
25500+
return needsCmpXchgNb(LI->getType()) ? AtomicExpansionKind::CmpXChg
25501+
: AtomicExpansionKind::None;
2550325502
}
2550425503

2550525504
TargetLowering::AtomicExpansionKind

0 commit comments

Comments
 (0)