[llvm] 149195f - [PPCISelLowering] Avoid use of getPointerElementType()
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 7 05:30:21 PST 2022
Author: Nikita Popov
Date: 2022-02-07T14:30:15+01:00
New Revision: 149195f576058bc84ad167e597b4a163b9f1e551
URL: https://github.com/llvm/llvm-project/commit/149195f576058bc84ad167e597b4a163b9f1e551
DIFF: https://github.com/llvm/llvm-project/commit/149195f576058bc84ad167e597b4a163b9f1e551.diff
LOG: [PPCISelLowering] Avoid use of getPointerElementType()
Use the value type instead.
Added:
Modified:
llvm/lib/Target/PowerPC/PPCISelLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
index 9e08487f091b9..b487bee23a854 100644
--- a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
+++ b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
@@ -18046,7 +18046,7 @@ Value *PPCTargetLowering::emitMaskedAtomicRMWIntrinsic(
assert(EnableQuadwordAtomics && Subtarget.hasQuadwordAtomics() &&
"Only support quadword now");
Module *M = Builder.GetInsertBlock()->getParent()->getParent();
- Type *ValTy = AlignedAddr->getType()->getPointerElementType();
+ Type *ValTy = Incr->getType();
assert(ValTy->getPrimitiveSizeInBits() == 128);
Function *RMW = Intrinsic::getDeclaration(
M, getIntrinsicForAtomicRMWBinOp128(AI->getOperation()));
@@ -18071,7 +18071,7 @@ Value *PPCTargetLowering::emitMaskedAtomicCmpXchgIntrinsic(
assert(EnableQuadwordAtomics && Subtarget.hasQuadwordAtomics() &&
"Only support quadword now");
Module *M = Builder.GetInsertBlock()->getParent()->getParent();
- Type *ValTy = AlignedAddr->getType()->getPointerElementType();
+ Type *ValTy = CmpVal->getType();
assert(ValTy->getPrimitiveSizeInBits() == 128);
Function *IntCmpXchg =
Intrinsic::getDeclaration(M, Intrinsic::ppc_cmpxchg_i128);
More information about the llvm-commits
mailing list