Skip to content

Commit 1d3681c

Browse files
committed
Remove UnsafeFPMath in combineRepeatedFPDivisors
1 parent 4a9bbb4 commit 1d3681c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18209,9 +18209,8 @@ SDValue DAGCombiner::combineRepeatedFPDivisors(SDNode *N) {
1820918209
// TODO: Limit this transform based on optsize/minsize - it always creates at
1821018210
// least 1 extra instruction. But the perf win may be substantial enough
1821118211
// that only minsize should restrict this.
18212-
bool UnsafeMath = DAG.getTarget().Options.UnsafeFPMath;
1821318212
const SDNodeFlags Flags = N->getFlags();
18214-
if (LegalDAG || (!UnsafeMath && !Flags.hasAllowReciprocal()))
18213+
if (LegalDAG || !Flags.hasAllowReciprocal())
1821518214
return SDValue();
1821618215

1821718216
// Skip if current node is a reciprocal/fneg-reciprocal.
@@ -18248,7 +18247,7 @@ SDValue DAGCombiner::combineRepeatedFPDivisors(SDNode *N) {
1824818247

1824918248
// This division is eligible for optimization only if global unsafe math
1825018249
// is enabled or if this division allows reciprocal formation.
18251-
if (UnsafeMath || U->getFlags().hasAllowReciprocal())
18250+
if (U->getFlags().hasAllowReciprocal())
1825218251
Users.insert(U);
1825318252
}
1825418253
}

0 commit comments

Comments
 (0)