forked from OSchip/llvm-project
[NFC] Avoid using pointee types in PPCISelLowering
A cmpxchg's new value type is the same as the pointer operand's pointee type.
This commit is contained in:
parent
283879793d
commit
f94a118a6e
|
@ -17651,10 +17651,7 @@ PPCTargetLowering::shouldExpandAtomicRMWInIR(AtomicRMWInst *AI) const {
|
|||
|
||||
TargetLowering::AtomicExpansionKind
|
||||
PPCTargetLowering::shouldExpandAtomicCmpXchgInIR(AtomicCmpXchgInst *AI) const {
|
||||
unsigned Size = AI->getPointerOperand()
|
||||
->getType()
|
||||
->getPointerElementType()
|
||||
->getPrimitiveSizeInBits();
|
||||
unsigned Size = AI->getNewValOperand()->getType()->getPrimitiveSizeInBits();
|
||||
if (EnableQuadwordAtomics && Subtarget.hasQuadwordAtomics() && Size == 128)
|
||||
return AtomicExpansionKind::MaskedIntrinsic;
|
||||
return TargetLowering::shouldExpandAtomicCmpXchgInIR(AI);
|
||||
|
|
Loading…
Reference in New Issue