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
|
TargetLowering::AtomicExpansionKind
|
||||||
PPCTargetLowering::shouldExpandAtomicCmpXchgInIR(AtomicCmpXchgInst *AI) const {
|
PPCTargetLowering::shouldExpandAtomicCmpXchgInIR(AtomicCmpXchgInst *AI) const {
|
||||||
unsigned Size = AI->getPointerOperand()
|
unsigned Size = AI->getNewValOperand()->getType()->getPrimitiveSizeInBits();
|
||||||
->getType()
|
|
||||||
->getPointerElementType()
|
|
||||||
->getPrimitiveSizeInBits();
|
|
||||||
if (EnableQuadwordAtomics && Subtarget.hasQuadwordAtomics() && Size == 128)
|
if (EnableQuadwordAtomics && Subtarget.hasQuadwordAtomics() && Size == 128)
|
||||||
return AtomicExpansionKind::MaskedIntrinsic;
|
return AtomicExpansionKind::MaskedIntrinsic;
|
||||||
return TargetLowering::shouldExpandAtomicCmpXchgInIR(AI);
|
return TargetLowering::shouldExpandAtomicCmpXchgInIR(AI);
|
||||||
|
|
Loading…
Reference in New Issue