Skip to content

Commit 59f3176

Browse files
committed
remove UnsafeFPMath usages in visitFADD
1 parent 3ab64c5 commit 59f3176

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17632,7 +17632,7 @@ SDValue DAGCombiner::visitFADD(SDNode *N) {
1763217632
// If 'unsafe math' or reassoc and nsz, fold lots of things.
1763317633
// TODO: break out portions of the transformations below for which Unsafe is
1763417634
// considered and which do not require both nsz and reassoc
17635-
if (((Options.UnsafeFPMath && Options.NoSignedZerosFPMath) ||
17635+
if ((Options.NoSignedZerosFPMath ||
1763617636
(Flags.hasAllowReassociation() && Flags.hasNoSignedZeros())) &&
1763717637
AllowNewConst) {
1763817638
// fadd (fadd x, c1), c2 -> fadd x, c1 + c2
@@ -17719,7 +17719,7 @@ SDValue DAGCombiner::visitFADD(SDNode *N) {
1771917719
}
1772017720
} // enable-unsafe-fp-math && AllowNewConst
1772117721

17722-
if (((Options.UnsafeFPMath && Options.NoSignedZerosFPMath) ||
17722+
if ((Options.NoSignedZerosFPMath ||
1772317723
(Flags.hasAllowReassociation() && Flags.hasNoSignedZeros()))) {
1772417724
// Fold fadd(vecreduce(x), vecreduce(y)) -> vecreduce(fadd(x, y))
1772517725
if (SDValue SD = reassociateReduction(ISD::VECREDUCE_FADD, ISD::FADD, DL,

0 commit comments

Comments
 (0)