[llvm] [VPlan] Change parent of VPReductionRecipe to VPRecipeWithIRFlags. NFC (PR #130881)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 14 10:10:43 PDT 2025


================
@@ -2296,29 +2304,34 @@ class VPReductionRecipe : public VPSingleDefRecipe {
 protected:
   VPReductionRecipe(const unsigned char SC, const RecurrenceDescriptor &R,
                     Instruction *I, ArrayRef<VPValue *> Operands,
-                    VPValue *CondOp, bool IsOrdered, DebugLoc DL)
-      : VPSingleDefRecipe(SC, Operands, I, DL), RdxDesc(R),
+                    VPValue *CondOp, bool IsOrdered)
+      : VPRecipeWithIRFlags(SC, Operands, *I), RdxDesc(R),
         IsOrdered(IsOrdered) {
     if (CondOp) {
----------------
lukel97 wrote:

> The RecurrenceDescriptor default contains fast flags. If we always set the FMF directly from recurrenceDescriptor without check if the underlyingInstruction is FPMathOperator or not, we will see fast on the integer reduction.

Yes but this is the current behaviour today, the flags were just hidden from the print output because of the `if (isa<FPMathOperator>(getUnderlyingInstr()))`. I think that's why we're seeing the test changes

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


More information about the llvm-commits mailing list