================
@@ -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:
You might be able to just unconditionally call CreateInBoundsPtrAdd, I don't
remember if that one auto-folds out the 0 offsets
https://github.com/llvm/llvm-project/pull/149093
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits