[llvm] [VPlan] Fix WideIVStep wrap-flags (PR #191284)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 13 05:52:37 PDT 2026


================
@@ -182,20 +182,22 @@ void UnrollState::unrollWidenInductionByUF(
   auto &ID = IV->getInductionDescriptor();
   FastMathFlags FMF;
   VPIRFlags::WrapFlagsTy WrapFlags(false, false);
+  VPIRFlags Flags;
   if (auto *IntOrFPInd = dyn_cast<VPWidenIntOrFpInductionRecipe>(IV)) {
     if (IntOrFPInd->hasFastMathFlags())
       FMF = IntOrFPInd->getFastMathFlags();
     if (IntOrFPInd->hasNoWrapFlags())
       WrapFlags = IntOrFPInd->getNoWrapFlags();
+    Flags = *IntOrFPInd;
----------------
fhahn wrote:

can we unify this logic here somehow, instead of having `Flags` track the same as `FMF` and `WrapFlags`?

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


More information about the llvm-commits mailing list