Skip to content

Commit 18153d0

Browse files
author
Andy Kaylor
committed
Remove fp-contract changes, defer to a future PR
1 parent f407e0c commit 18153d0

File tree

4 files changed

+7
-9
lines changed

4 files changed

+7
-9
lines changed

clang/docs/ReleaseNotes.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,9 @@ Modified Compiler Flags
180180
optimizations when the ``fast`` argument is used and to accept a new argument,
181181
``aggressive``. The behavior of ``-ffp-model=aggressive`` is equivalent
182182
to the previous behavior of ``-ffp-model=fast``. The updated
183-
``-ffp-model=fast`` behavior no longer assumes finite math only, uses
183+
``-ffp-model=fast`` behavior no longer assumes finite math only and uses
184184
the ``promoted`` algorithm for complex division when possible rather than the
185-
less basic (limited range) algorithm, and sets
186-
``-ffp-contract=fast-honor-pragmas`` rather than ``-ffp-contract=fast``.
185+
less basic (limited range) algorithm.
187186

188187
Removed Compiler Flags
189188
-------------------------

clang/docs/UsersManual.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1467,7 +1467,7 @@ floating point semantic models: precise (the default), strict, and fast.
14671467
"except_behavior", "ignore", "strict", "ignore", "ignore"
14681468
"fenv_access", "off", "on", "off", "off"
14691469
"rounding_mode", "tonearest", "dynamic", "tonearest", "tonearest"
1470-
"contract", "on", "off", "fast-honor-pragmas", "fast-honor-pragmas"
1470+
"contract", "on", "off", "fast", "fast"
14711471
"support_math_errno", "on", "on", "off", "off"
14721472
"no_honor_nans", "off", "off", "off", "on"
14731473
"no_honor_infinities", "off", "off", "off", "on"
@@ -1770,7 +1770,7 @@ for more details.
17701770
top of the source file.
17711771
* ``fast`` Behaves identically to specifying ``-funsafe-math-optimizations``,
17721772
``-fno-math-errno`` and ``-fcomplex-arithmetic=promoted``
1773-
``ffp-contract=fast-honor-pragmas``
1773+
``ffp-contract=fast``
17741774
* ``aggressive`` Behaves identically to specifying both ``-ffast-math`` and
17751775
``ffp-contract=fast``
17761776

clang/lib/Driver/ToolChains/Clang.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2935,12 +2935,10 @@ static void RenderFloatingPointOptions(const ToolChain &TC, const Driver &D,
29352935
if (Aggressive) {
29362936
HonorINFs = false;
29372937
HonorNaNs = false;
2938-
FPContract = "fast";
29392938
setComplexRange(LangOptions::ComplexRangeKind::CX_Basic);
29402939
} else {
29412940
HonorINFs = true;
29422941
HonorNaNs = true;
2943-
FPContract = "fast-honor-pragmas";
29442942
setComplexRange(LangOptions::ComplexRangeKind::CX_Promoted);
29452943
}
29462944
MathErrno = false;
@@ -2951,6 +2949,7 @@ static void RenderFloatingPointOptions(const ToolChain &TC, const Driver &D,
29512949
TrappingMath = false;
29522950
RoundingFPMath = false;
29532951
FPExceptionBehavior = "";
2952+
FPContract = "fast";
29542953
SeenUnsafeMathModeOption = true;
29552954
};
29562955

clang/test/Driver/fp-model.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@
142142
// CHECK-FPM-FAST-SAME: "-fno-signed-zeros"
143143
// CHECK-FPM-FAST-SAME: "-mreassociate"
144144
// CHECK-FPM-FAST-SAME: "-freciprocal-math"
145-
// CHECK-FPM-FAST-SAME: "-ffp-contract=fast-honor-pragmas"
145+
// CHECK-FPM-FAST-SAME: "-ffp-contract=fast"
146146
// CHECK-FPM-FAST-SAME: "-fno-rounding-math"
147147
// CHECK-FPM-FAST-NOT: "-ffast-math"
148148
// CHECK-FPM-FAST-NOT: "-ffinite-math-only"
@@ -214,7 +214,7 @@
214214
// CHECK-FASTMATH-FPM-FAST-SAME: "-fno-signed-zeros"
215215
// CHECK-FASTMATH-FPM-FAST-SAME: "-mreassociate"
216216
// CHECK-FASTMATH-FPM-FAST-SAME: "-freciprocal-math"
217-
// CHECK-FASTMATH-FPM-FAST-SAME: "-ffp-contract=fast-honor-pragmas"
217+
// CHECK-FASTMATH-FPM-FAST-SAME: "-ffp-contract=fast"
218218
// CHECK-FASTMATH-FPM-FAST-SAME: "-fno-rounding-math"
219219
// CHECK-FASTMATH-FPM-FAST-NOT: "-ffast-math"
220220
// CHECK-FASTMATH-FPM-FAST-NOT: "-ffinite-math-only"

0 commit comments

Comments
 (0)