Skip to content

Commit 5dda9d9

Browse files
committed
remove UnsafeFPMath usages in visitFADD
1 parent 613222e commit 5dda9d9

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
@@ -17581,7 +17581,7 @@ SDValue DAGCombiner::visitFADD(SDNode *N) {
1758117581
// If 'unsafe math' or reassoc and nsz, fold lots of things.
1758217582
// TODO: break out portions of the transformations below for which Unsafe is
1758317583
// considered and which do not require both nsz and reassoc
17584-
if (((Options.UnsafeFPMath && Options.NoSignedZerosFPMath) ||
17584+
if ((Options.NoSignedZerosFPMath ||
1758517585
(Flags.hasAllowReassociation() && Flags.hasNoSignedZeros())) &&
1758617586
AllowNewConst) {
1758717587
// fadd (fadd x, c1), c2 -> fadd x, c1 + c2
@@ -17668,7 +17668,7 @@ SDValue DAGCombiner::visitFADD(SDNode *N) {
1766817668
}
1766917669
} // enable-unsafe-fp-math && AllowNewConst
1767017670

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

0 commit comments

Comments
 (0)