================
@@ -4789,8 +4793,14 @@ bool VectorCombine::shrinkLoadForShuffles(Instruction 
&I) {
         return false;
 
       // Create new load of smaller vector.
+      Type *IndexTy = DL->getIndexType(PtrOp->getType());
+      Constant *PtrOffset = ConstantInt::get(IndexTy, LowOffset);
+      Value *NewPtr = LowOffset > 0u
+                          ? Builder.CreateInBoundsPtrAdd(PtrOp, PtrOffset)
+                          : PtrOp;
----------------
arsenm wrote:

```suggestion
      Value *NewPtr = LowOffset > 0u
                          ? Builder.CreateInBoundsPtrAdd(PtrOp, 
ConstantInt::get(IndexTy, LowOffset))
                          : PtrOp;
```

https://github.com/llvm/llvm-project/pull/149093
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to