[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 09:32:13 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:

But this sets the underlying instruction on line 2311? Without this we end up with the non-FMF flag in llvm/test/Transforms/LoopVectorize/RISCV/vplan-vp-intrinsics-reduction.ll

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


More information about the llvm-commits mailing list