[llvm] [VPlan] Refine DerivedIV nowrap contract (PR #205908)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 2 03:00:58 PDT 2026


================
@@ -4008,12 +4016,22 @@ static void expandVPDerivedIV(VPDerivedIVRecipe *R) {
   case InductionDescriptor::IK_IntInduction: {
     assert(Index->getScalarType() == Start->getScalarType() &&
            "Index type does not match StartValue type");
+    VPIRFlags::WrapFlagsTy NW;
+    auto *RFlags = dyn_cast<VPRecipeWithIRFlags>(Index);
----------------
fhahn wrote:

Do we have a test chat is impacted by those changes? Unless I missed something, all tests are GEPs?

It is also not clear to me how no-wrap on the index implies no-wrap on `Start + ScaledIndex`? Shouldn't the flags from the DerivedIV apply to both the add and the scaling?

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


More information about the llvm-commits mailing list