File tree 1 file changed +6
-6
lines changed
llvm/lib/Transforms/Vectorize 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -13037,6 +13037,12 @@ class HorizontalReduction {
13037
13037
continue;
13038
13038
IgnoreList.insert(RdxOp);
13039
13039
}
13040
+ // Intersect the fast-math-flags from all reduction operations.
13041
+ FastMathFlags RdxFMF;
13042
+ RdxFMF.set();
13043
+ for (Value *U : IgnoreList)
13044
+ if (auto *FPMO = dyn_cast<FPMathOperator>(U))
13045
+ RdxFMF &= FPMO->getFastMathFlags();
13040
13046
bool IsCmpSelMinMax = isCmpSelMinMax(cast<Instruction>(ReductionRoot));
13041
13047
13042
13048
// Need to track reduced vals, they may be changed during vectorization of
@@ -13297,12 +13303,6 @@ class HorizontalReduction {
13297
13303
13298
13304
V.computeMinimumValueSizes();
13299
13305
13300
- // Intersect the fast-math-flags from all reduction operations.
13301
- FastMathFlags RdxFMF;
13302
- RdxFMF.set();
13303
- for (Value *U : IgnoreList)
13304
- if (auto *FPMO = dyn_cast<FPMathOperator>(U))
13305
- RdxFMF &= FPMO->getFastMathFlags();
13306
13306
// Estimate cost.
13307
13307
InstructionCost TreeCost = V.getTreeCost(VL);
13308
13308
InstructionCost ReductionCost =
You can’t perform that action at this time.
0 commit comments