[llvm] [VPlan] Endow DerivedIV with IRFlags (PR #205908)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 22 07:50:31 PDT 2026


================
@@ -4154,10 +4155,10 @@ class VPWidenCanonicalIVRecipe : public VPRecipeWithIRFlags {
 #endif
 };
 
-/// A recipe for converting the input value \p IV value to the corresponding
-/// value of an IV with different start and step values, using Start + IV *
-/// Step.
-class VPDerivedIVRecipe : public VPSingleDefRecipe {
+/// A recipe for converting \p Index into \p Start + \p Index * \p Step.
+/// FastMathFlags are derived from the \p FPBinOp in the case of FP inductions,
+/// and the passed NoWrap \p Flags apply in the case of Ptr and Int inductions.
+class VPDerivedIVRecipe : public VPSingleDefRecipe, public VPIRFlags {
----------------
fhahn wrote:

I think this should just inherit from `VPRecipeWithIRFlags`, matching the `classof`

```suggestion
class VPDerivedIVRecipe : public VPRecipeWithIRFlags {
```

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


More information about the llvm-commits mailing list