1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00

[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.

llvm-svn: 356721
This commit is contained in:
Craig Topper 2019-03-21 21:37:18 +00:00
parent ac24d50eee
commit 23b0d5481d

View File

@ -25497,9 +25497,8 @@ bool X86TargetLowering::shouldExpandAtomicStoreInIR(StoreInst *SI) const {
// FIXME: On 32 bits x86, fild/movq might be faster than lock cmpxchg8b.
TargetLowering::AtomicExpansionKind
X86TargetLowering::shouldExpandAtomicLoadInIR(LoadInst *LI) const {
auto PTy = cast<PointerType>(LI->getPointerOperandType());
return needsCmpXchgNb(PTy->getElementType()) ? AtomicExpansionKind::CmpXChg
: AtomicExpansionKind::None;
return needsCmpXchgNb(LI->getType()) ? AtomicExpansionKind::CmpXChg
: AtomicExpansionKind::None;
}
TargetLowering::AtomicExpansionKind