[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 07:32:11 PDT 2025


================
@@ -2224,7 +2224,8 @@ void VPReductionRecipe::execute(VPTransformState &State) {
   RecurKind Kind = RdxDesc.getRecurrenceKind();
   // Propagate the fast-math flags carried by the underlying instruction.
   IRBuilderBase::FastMathFlagGuard FMFGuard(State.Builder);
-  State.Builder.setFastMathFlags(RdxDesc.getFastMathFlags());
+  if (hasFastMathFlags())
+    State.Builder.setFastMathFlags(getFastMathFlags());
----------------
lukel97 wrote:

A RecurrenceDescriptor only carries FastMathFlags. So actually for this to be NFC as possible I think we shouldn't set the flags for any instruction that's not a FPMathOperator. 

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


More information about the llvm-commits mailing list