[llvm] [VPlan] zext canonical IV in convertToStridedAccesses (PR #212291)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 28 00:47:17 PDT 2026
================
@@ -5815,7 +5815,7 @@ void VPlanTransforms::convertToStridedAccesses(VPlan &Plan,
Type *IndexTy = Plan.getDataLayout().getIndexType(Ptr->getScalarType());
assert(IndexTy == StrideInBytes->getScalarType() &&
"Stride type from SCEV must match the index type");
- VPValue *CanIV = Builder.createScalarSExtOrTrunc(
+ VPValue *CanIV = Builder.createScalarZExtOrTrunc(
----------------
lukel97 wrote:
I had the same thought back when reviewing https://github.com/llvm/llvm-project/pull/201070, but it turns out it's correct because GEP indices are truncated https://github.com/llvm/llvm-project/pull/201070#discussion_r3354521308
https://github.com/llvm/llvm-project/pull/212291
More information about the llvm-commits
mailing list