[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:
Arthur Eubanks 2021-09-12 17:36:46 -07:00
parent 283879793d
commit f94a118a6e
1 changed files with 1 additions and 4 deletions

View File

@ -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);