From f94a118a6eb381454c658f62958678c6a442eefb Mon Sep 17 00:00:00 2001 From: Arthur Eubanks Date: Sun, 12 Sep 2021 17:36:46 -0700 Subject: [PATCH] [NFC] Avoid using pointee types in PPCISelLowering A cmpxchg's new value type is the same as the pointer operand's pointee type. --- llvm/lib/Target/PowerPC/PPCISelLowering.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp index c1230c6..771cf8d 100644 --- a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp +++ b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp @@ -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); -- 2.7.4