================ @@ -1986,10 +1986,10 @@ void VPReverseVectorPointerRecipe::execute(VPTransformState &State) { // LastLane = 1 - RunTimeVF Value *LastLane = Builder.CreateSub(ConstantInt::get(IndexTy, 1), RunTimeVF); Value *Ptr = State.get(getOperand(0), VPLane(0)); - Value *ResultPtr = - Builder.CreateGEP(IndexedTy, Ptr, NumElt, "", getGEPNoWrapFlags()); - ResultPtr = Builder.CreateGEP(IndexedTy, ResultPtr, LastLane, "", - getGEPNoWrapFlags()); + // N.B. we deliberately do not use getGEPNoWrapFlags here, because this + // transform can invalidate `inbounds`. + Value *ResultPtr = Builder.CreateGEP(IndexedTy, Ptr, NumElt, ""); + ResultPtr = Builder.CreateGEP(IndexedTy, ResultPtr, LastLane, ""); ---------------- fhahn wrote:
I might be missing something, but ithe inbounds is still not added here when creating the pointer, but it should also not be added to the recipe on construction of the recipe. https://github.com/llvm/llvm-project/pull/120730 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits