[llvm] 682ef39 - [InstCombine] Remove call to getPointerElementType()

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 29 07:52:43 PDT 2022


Author: Nikita Popov
Date: 2022-03-29T16:52:29+02:00
New Revision: 682ef39b1a171e60cbf3f5395e835ef06d80c45e

URL: https://github.com/llvm/llvm-project/commit/682ef39b1a171e60cbf3f5395e835ef06d80c45e
DIFF: https://github.com/llvm/llvm-project/commit/682ef39b1a171e60cbf3f5395e835ef06d80c45e.diff

LOG: [InstCombine] Remove call to getPointerElementType()

This was erroneously re-introduced as part of
bb0b23174e4ab963df427393fbf21bddede499bf.

Added: 
    

Modified: 
    llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
index ed5b8d0397f9a..c8f208d2da0d4 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
@@ -3292,7 +3292,7 @@ bool InstCombinerImpl::transformConstExprCastCall(CallBase &Call) {
         !ParamTy->isOpaquePointerTy()) {
       AttrBuilder AB(Ctx, CallerPAL.getParamAttrs(i).removeAttributes(
                               Ctx, IncompatibleAttrs));
-      AB.addByValAttr(NewArg->getType()->getPointerElementType());
+      AB.addByValAttr(ParamTy->getNonOpaquePointerElementType());
       ArgAttrs.push_back(AttributeSet::get(Ctx, AB));
     } else {
       ArgAttrs.push_back(


        


More information about the llvm-commits mailing list