Skip to content

Commit 15d11eb

Browse files
authored
[NFC] "unsafe-fp-math" post cleanup (code comments part) (#164582)
1 parent 10d3c6b commit 15d11eb

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17460,8 +17460,8 @@ SDValue DAGCombiner::visitFSUBForFMACombine(SDNode *N) {
1746017460
// fold (fsub (fpext (fneg (fmul, x, y))), z)
1746117461
// -> (fneg (fma (fpext x), (fpext y), z))
1746217462
// Note: This could be removed with appropriate canonicalization of the
17463-
// input expression into (fneg (fadd (fpext (fmul, x, y)), z). However, the
17464-
// orthogonal flags -fp-contract=fast and -enable-unsafe-fp-math prevent
17463+
// input expression into (fneg (fadd (fpext (fmul, x, y)), z)). However, the
17464+
// command line flag -fp-contract=fast and fast-math flag contract prevent
1746517465
// from implementing the canonicalization in visitFSUB.
1746617466
if (matcher.match(N0, ISD::FP_EXTEND)) {
1746717467
SDValue N00 = N0.getOperand(0);
@@ -17485,7 +17485,7 @@ SDValue DAGCombiner::visitFSUBForFMACombine(SDNode *N) {
1748517485
// -> (fneg (fma (fpext x)), (fpext y), z)
1748617486
// Note: This could be removed with appropriate canonicalization of the
1748717487
// input expression into (fneg (fadd (fpext (fmul, x, y)), z). However, the
17488-
// orthogonal flags -fp-contract=fast and -enable-unsafe-fp-math prevent
17488+
// command line flag -fp-contract=fast and fast-math flag contract prevent
1748917489
// from implementing the canonicalization in visitFSUB.
1749017490
if (matcher.match(N0, ISD::FNEG)) {
1749117491
SDValue N00 = N0.getOperand(0);

llvm/lib/Target/PowerPC/PPCISelLowering.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14736,8 +14736,8 @@ SDValue PPCTargetLowering::getRecipEstimate(SDValue Operand, SelectionDAG &DAG,
1473614736
}
1473714737

1473814738
unsigned PPCTargetLowering::combineRepeatedFPDivisors() const {
14739-
// Note: This functionality is used only when unsafe-fp-math is enabled, and
14740-
// on cores with reciprocal estimates (which are used when unsafe-fp-math is
14739+
// Note: This functionality is used only when arcp is enabled, and
14740+
// on cores with reciprocal estimates (which are used when arcp is
1474114741
// enabled for division), this functionality is redundant with the default
1474214742
// combiner logic (once the division -> reciprocal/multiply transformation
1474314743
// has taken place). As a result, this matters more for older cores than for

llvm/lib/Target/X86/X86ISelLowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20558,7 +20558,7 @@ static SDValue lowerUINT_TO_FP_vXi32(SDValue Op, const SDLoc &DL,
2055820558

2055920559
// float4 fhi = (float4) hi - (0x1.0p39f + 0x1.0p23f);
2056020560
// NOTE: By using fsub of a positive constant instead of fadd of a negative
20561-
// constant, we avoid reassociation in MachineCombiner when unsafe-fp-math is
20561+
// constant, we avoid reassociation in MachineCombiner when reassoc is
2056220562
// enabled. See PR24512.
2056320563
SDValue HighBitcast = DAG.getBitcast(VecFloatVT, High);
2056420564
// TODO: Are there any fast-math-flags to propagate here?

llvm/lib/Target/X86/X86InstrAVX512.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5519,7 +5519,7 @@ defm VMIN : avx512_binop_s_sae<0x5D, "vmin", X86any_fmin, X86fmins, X86fminSAEs,
55195519
defm VMAX : avx512_binop_s_sae<0x5F, "vmax", X86any_fmax, X86fmaxs, X86fmaxSAEs,
55205520
SchedWriteFCmpSizes, 0>;
55215521

5522-
// MIN/MAX nodes are commutable under "unsafe-fp-math". In this case we use
5522+
// MIN/MAX nodes are commutable under (nnan + ninf). In this case we use
55235523
// X86fminc and X86fmaxc instead of X86fmin and X86fmax
55245524
multiclass avx512_comutable_binop_s<bits<8> opc, string OpcodeStr,
55255525
X86VectorVTInfo _, SDNode OpNode,

0 commit comments

Comments
 (0)