[llvm] [IR] Replace of PointerType::getUnqual(Type) with opaque version (NFC) (PR #123909)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 22 01:50:29 PST 2025


================
@@ -1954,7 +1954,7 @@ instCombineLD1GatherIndex(InstCombiner &IC, IntrinsicInst &II) {
     Align Alignment =
         BasePtr->getPointerAlignment(II.getDataLayout());
 
-    Type *VecPtrTy = PointerType::getUnqual(Ty);
+    Type *VecPtrTy = PointerType::getUnqual(II.getContext());
     Value *Ptr = IC.Builder.CreateGEP(cast<VectorType>(Ty)->getElementType(),
                                       BasePtr, IndexBase);
     Ptr = IC.Builder.CreateBitCast(Ptr, VecPtrTy);
----------------
nikic wrote:

Can remove this bitcast (and the following).

https://github.com/llvm/llvm-project/pull/123909


More information about the llvm-commits mailing list