[llvm] [InferAddressSpaces] Handle unconverted ptrmask (PR #140802)

Robert Imschweiler via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 26 05:56:28 PDT 2025


================
@@ -709,7 +708,11 @@ Value *InferAddressSpacesImpl::clonePtrMaskWithNewAddressSpace(
 
   IRBuilder<> B(I);
   if (NewPtrBits) {
-    MaskTy = B.getIntNTy(NewPtrBits->getBitWidth());
+    if (MaskTy->isVectorTy())
+      MaskTy = VectorType::get(B.getIntNTy(NewPtrBits->getBitWidth()),
+                               cast<VectorType>(MaskTy));
+    else
+      MaskTy = B.getIntNTy(NewPtrBits->getBitWidth());
----------------
ro-i wrote:

that's definitively nicer, thanks

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


More information about the llvm-commits mailing list