Skip to content

Commit abd65e9

Browse files
committed
!fixup, Remove FMF from recipes after add checks of underlying instruction.
1 parent 942a14d commit abd65e9

File tree

1 file changed

+4
-6
lines changed
  • llvm/lib/Transforms/Vectorize

1 file changed

+4
-6
lines changed

llvm/lib/Transforms/Vectorize/VPlan.h

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2297,10 +2297,9 @@ class VPReductionRecipe : public VPRecipeWithIRFlags {
22972297

22982298
protected:
22992299
VPReductionRecipe(const unsigned char SC, const RecurrenceDescriptor &R,
2300-
FastMathFlags FMF, Instruction *I,
2301-
ArrayRef<VPValue *> Operands, VPValue *CondOp,
2302-
bool IsOrdered, DebugLoc DL)
2303-
: VPRecipeWithIRFlags(SC, Operands, FMF, DL), RdxDesc(R),
2300+
Instruction *I, ArrayRef<VPValue *> Operands,
2301+
VPValue *CondOp, bool IsOrdered, DebugLoc DL)
2302+
: VPRecipeWithIRFlags(SC, Operands, R.getFastMathFlags(), DL), RdxDesc(R),
23042303
IsOrdered(IsOrdered) {
23052304
if (CondOp) {
23062305
IsConditional = true;
@@ -2313,7 +2312,7 @@ class VPReductionRecipe : public VPRecipeWithIRFlags {
23132312
VPReductionRecipe(const RecurrenceDescriptor &R, Instruction *I,
23142313
VPValue *ChainOp, VPValue *VecOp, VPValue *CondOp,
23152314
bool IsOrdered, DebugLoc DL = {})
2316-
: VPReductionRecipe(VPDef::VPReductionSC, R, R.getFastMathFlags(), I,
2315+
: VPReductionRecipe(VPDef::VPReductionSC, R, I,
23172316
ArrayRef<VPValue *>({ChainOp, VecOp}), CondOp,
23182317
IsOrdered, DL) {}
23192318

@@ -2376,7 +2375,6 @@ class VPReductionEVLRecipe : public VPReductionRecipe {
23762375
DebugLoc DL = {})
23772376
: VPReductionRecipe(
23782377
VPDef::VPReductionEVLSC, R.getRecurrenceDescriptor(),
2379-
R.getFastMathFlags(),
23802378
cast_or_null<Instruction>(R.getUnderlyingValue()),
23812379
ArrayRef<VPValue *>({R.getChainOp(), R.getVecOp(), &EVL}), CondOp,
23822380
R.isOrdered(), DL) {}

0 commit comments

Comments
 (0)