[flang-commits] [flang] [llvm] [VPlan] Fix wrap-flags on WidenInduction unroll (PR #187710)

Ramkumar Ramachandra via flang-commits flang-commits at lists.llvm.org
Wed Mar 25 04:25:39 PDT 2026


================
@@ -214,12 +219,10 @@ void UnrollState::unrollWidenInductionByUF(
     AddFlags = GEPNoWrapFlags::none();
   } else if (IVTy->isFloatingPointTy()) {
     AddOpc = ID.getInductionOpcode();
-    AddFlags = Flags; // FMF flags
+    AddFlags = FMF;
   } else {
     AddOpc = Instruction::Add;
-    AddFlags = VPIRFlags::getDefaultFlags(AddOpc);
-    if (cast<VPWidenIntOrFpInductionRecipe>(IV)->isCanonical())
-      AddFlags = VPIRFlags::WrapFlagsTy(/*NUW=*/true, /*NSW=*/false);
----------------
artagnon wrote:

Ah yes, I didn't realize that this was the problem for the failing instcombine fixpoint-verification! Fixed now, thanks.

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


More information about the flang-commits mailing list