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

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 20 06:29:00 PST 2025


================
@@ -70,7 +70,7 @@ static Instruction *simplifyX86MaskedLoad(IntrinsicInst &II, InstCombiner &IC) {
     // First, cast the x86 intrinsic scalar pointer to a vector pointer to match
     // the LLVM intrinsic definition for the pointer argument.
     unsigned AddrSpace = cast<PointerType>(Ptr->getType())->getAddressSpace();
-    PointerType *VecPtrTy = PointerType::get(II.getType(), AddrSpace);
+    PointerType *VecPtrTy = PointerType::get(II.getContext(), AddrSpace);
     Value *PtrCast = IC.Builder.CreateBitCast(Ptr, VecPtrTy, "castvec");
----------------
nikic wrote:

This and the next bitcast can be removed as well.

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


More information about the llvm-commits mailing list