[AMDGPU] Removed superfluous predicate. NFC.
[llvm-project.git] / clang / test / Driver / fast-math.c
blob34b9899e9fc185ec7dd6447babf57cf7949b337f
1 // Test that the GCC fast-math floating point flags get lowered to the correct
2 // permutation of Clang frontend flags. This is non-trivial for a few reasons.
3 // First, the GCC flags have many different and surprising effects. Second,
4 // LLVM only supports three switches which is more coarse grained than GCC's
5 // support.
6 //
7 // Both of them use gcc driver for as.
8 //
9 // RUN: %clang -### -fno-honor-infinities -c %s 2>&1 \
10 // RUN: | FileCheck --check-prefix=CHECK-NO-INFS %s
11 // infinites [sic] is a supported alternative spelling of infinities.
12 // RUN: %clang -### -fno-honor-infinites -c %s 2>&1 \
13 // RUN: | FileCheck --check-prefix=CHECK-NO-INFS %s
14 // CHECK-NO-INFS: "-cc1"
15 // CHECK-NO-INFS: "-menable-no-infs"
17 // RUN: %clang -### -fno-fast-math -fno-honor-infinities -c %s 2>&1 \
18 // RUN: | FileCheck --check-prefix=CHECK-NO-FAST-MATH-NO-INFS %s
19 // CHECK-NO-FAST-MATH-NO-INFS: "-cc1"
20 // CHECK-NO-FAST-MATH-NO-INFS: "-menable-no-infs"
22 // RUN: %clang -### -fno-honor-infinities -fno-fast-math -c %s 2>&1 \
23 // RUN: | FileCheck --check-prefix=CHECK-NO-INFS-NO-FAST-MATH %s
24 // CHECK-NO-INFS-NO-FAST-MATH: "-cc1"
25 // CHECK-NO-INFS-NO-FAST-MATH-NOT: "-menable-no-infs"
27 // RUN: %clang -### -fno-signed-zeros -c %s 2>&1 \
28 // RUN: | FileCheck --check-prefix=CHECK-NO-SIGNED-ZEROS %s
29 // CHECK-NO-SIGNED-ZEROS: "-cc1"
30 // CHECK-NO-SIGNED-ZEROS: "-fno-signed-zeros"
32 // RUN: %clang -### -fno-fast-math -fno-signed-zeros -c %s 2>&1 \
33 // RUN: | FileCheck --check-prefix=CHECK-NO-FAST-MATH-NO-SIGNED-ZEROS %s
34 // CHECK-NO-FAST-MATH-NO-SIGNED-ZEROS: "-cc1"
35 // CHECK-NO-FAST-MATH-NO-SIGNED-ZEROS: "-fno-signed-zeros"
37 // RUN: %clang -### -fno-signed-zeros -fno-fast-math -c %s 2>&1 \
38 // RUN: | FileCheck --check-prefix=CHECK-NO-SIGNED-ZEROS-NO-FAST-MATH %s
39 // CHECK-NO-SIGNED-ZEROS-NO-FAST-MATH: "-cc1"
40 // CHECK-NO-SIGNED-ZEROS-NO-FAST-MATH-NOT: "-fno-signed-zeros"
42 // RUN: %clang -### -freciprocal-math -c %s 2>&1 \
43 // RUN: | FileCheck --check-prefix=CHECK-RECIPROCAL-MATH %s
44 // CHECK-RECIPROCAL-MATH: "-cc1"
45 // CHECK-RECIPROCAL-MATH: "-freciprocal-math"
47 // RUN: %clang -### -fno-fast-math -freciprocal-math -c %s 2>&1 \
48 // RUN: | FileCheck --check-prefix=CHECK-NO-FAST-MATH-RECIPROCAL-MATH %s
49 // CHECK-NO-FAST-MATH-RECIPROCAL-MATH: "-cc1"
50 // CHECK-NO-FAST-MATH-RECIPROCAL-MATH: "-freciprocal-math"
52 // RUN: %clang -### -freciprocal-math -fno-fast-math -c %s 2>&1 \
53 // RUN: | FileCheck --check-prefix=CHECK-RECIPROCAL-MATH-NO-FAST-MATH %s
54 // CHECK-RECIPROCAL-MATH-NO-FAST-MATH: "-cc1"
55 // CHECK-RECIPROCAL-MATH-NO-FAST-MATH-NOT: "-freciprocal-math"
57 // RUN: %clang -### -fno-honor-nans -c %s 2>&1 \
58 // RUN: | FileCheck --check-prefix=CHECK-NO-NANS %s
59 // CHECK-NO-NANS: "-cc1"
60 // CHECK-NO-NANS: "-menable-no-nans"
62 // RUN: %clang -### -fno-fast-math -fno-honor-nans -c %s 2>&1 \
63 // RUN: | FileCheck --check-prefix=CHECK-NO-FAST-MATH-NO-NANS %s
64 // CHECK-NO-FAST-MATH-NO-NANS: "-cc1"
65 // CHECK-NO-FAST-MATH-NO-NANS: "-menable-no-nans"
67 // RUN: %clang -### -fno-honor-nans -fno-fast-math -c %s 2>&1 \
68 // RUN: | FileCheck --check-prefix=CHECK-NO-NANS-NO-FAST-MATH %s
69 // CHECK-NO-NANS-NO-FAST-MATH: "-cc1"
70 // CHECK-NO-NANS-NO-FAST-MATH-NOT: "-menable-no-nans"
72 // RUN: %clang -### -ffast-math -fno-approx-func -c %s 2>&1 \
73 // RUN: | FileCheck --check-prefix=CHECK-FAST-MATH-NO-APPROX-FUNC %s
74 // CHECK-FAST-MATH-NO-APPROX-FUNC: "-cc1"
75 // CHECK-FAST-MATH-NO-APPROX-FUNC: "-menable-no-infs"
76 // CHECK-FAST-MATH-NO-APPROX-FUNC: "-menable-no-nans"
77 // CHECK-FAST-MATH-NO-APPROX-FUNC: "-fno-signed-zeros"
78 // CHECK-FAST-MATH-NO-APPROX-FUNC: "-mreassociate"
79 // CHECK-FAST-MATH-NO-APPROX-FUNC: "-freciprocal-math"
80 // CHECK-FAST-MATH-NO-APPROX-FUNC: "-ffp-contract=fast"
81 // CHECK-FAST-MATH-NO-APPROX-FUNC-NOT: "-ffast-math"
82 // CHECK-FAST-MATH-NO-APPROX-FUNC-NOT: "-fapprox-func"
84 // RUN: %clang -### -fno-approx-func -ffast-math -c %s 2>&1 \
85 // RUN: | FileCheck --check-prefix=CHECK-NO-APPROX-FUNC-FAST-MATH %s
86 // CHECK-NO-APPROX-FUNC-FAST-MATH: "-cc1"
87 // CHECK-NO-APPROX-FUNC-FAST-MATH: "-ffast-math"
89 // RUN: %clang -### -fapprox-func -c %s 2>&1 \
90 // RUN: | FileCheck --check-prefix=CHECK-APPROX-FUNC %s
91 // CHECK-APPROX-FUNC: "-cc1"
92 // CHECK-APPROX-FUNC: "-fapprox-func"
94 // RUN: %clang -### -fno-fast-math -fapprox-func -c %s 2>&1 \
95 // RUN: | FileCheck --check-prefix=CHECK-NO-FAST-MATH-APPROX-FUNC %s
96 // CHECK-NO-FAST-MATH-APPROX-FUNC: "-cc1"
97 // CHECK-NO-FAST-MATH-APPROX-FUNC: "-fapprox-func"
99 // RUN: %clang -### -fapprox-func -fno-fast-math -c %s 2>&1 \
100 // RUN: | FileCheck --check-prefix=CHECK-APPROX-FUNC-NO-FAST-MATH %s
101 // CHECK-APPROX-FUNC-NO-FAST-MATH: "-cc1"
102 // CHECK-APPROX-FUNC-NO-FAST-MATH-NOT: "-fapprox-func"
104 // RUN: %clang -### -fmath-errno -c %s 2>&1 \
105 // RUN: | FileCheck --check-prefix=CHECK-MATH-ERRNO %s
106 // CHECK-MATH-ERRNO: "-cc1"
107 // CHECK-MATH-ERRNO: "-fmath-errno"
109 // RUN: %clang -### -fmath-errno -fno-math-errno -c %s 2>&1 \
110 // RUN: | FileCheck --check-prefix=CHECK-NO-MATH-ERRNO %s
111 // CHECK-NO-MATH-ERRNO: "-cc1"
112 // CHECK-NO-MATH-ERRNO-NOT: "-fmath-errno"
114 // Target defaults for -fmath-errno (reusing the above checks).
115 // RUN: %clang -### -target i686-unknown-linux -c %s 2>&1 \
116 // RUN: | FileCheck --check-prefix=CHECK-MATH-ERRNO %s
117 // RUN: %clang -### -target i686-apple-darwin -c %s 2>&1 \
118 // RUN: | FileCheck --check-prefix=CHECK-NO-MATH-ERRNO %s
119 // RUN: %clang -### -target x86_64-unknown-freebsd -c %s 2>&1 \
120 // RUN: | FileCheck --check-prefix=CHECK-NO-MATH-ERRNO %s
121 // RUN: %clang -### -target x86_64-unknown-netbsd -c %s 2>&1 \
122 // RUN: | FileCheck --check-prefix=CHECK-NO-MATH-ERRNO %s
123 // RUN: %clang -### -target x86_64-unknown-openbsd -c %s 2>&1 \
124 // RUN: | FileCheck --check-prefix=CHECK-NO-MATH-ERRNO %s
125 // RUN: %clang -### -target x86_64-unknown-dragonfly -c %s 2>&1 \
126 // RUN: | FileCheck --check-prefix=CHECK-NO-MATH-ERRNO %s
127 // RUN: %clang -### -target x86_64-fuchsia -c %s 2>&1 \
128 // RUN: | FileCheck --check-prefix=CHECK-NO-MATH-ERRNO %s
129 // RUN: %clang -### -target x86_64-linux-android -c %s 2>&1 \
130 // RUN: | FileCheck --check-prefix=CHECK-NO-MATH-ERRNO %s
131 // RUN: %clang -### -target x86_64-linux-musl -c %s 2>&1 \
132 // RUN: | FileCheck --check-prefix=CHECK-NO-MATH-ERRNO %s
133 // RUN: %clang -### --target=amdgcn-amd-amdhsa -nogpuinc -nogpulib -c %s 2>&1 \
134 // RUN: | FileCheck --check-prefix=CHECK-NO-MATH-ERRNO %s
135 // RUN: %clang -### -target amdgcn-amd-amdpal -c %s 2>&1 \
136 // RUN: | FileCheck --check-prefix=CHECK-NO-MATH-ERRNO %s
137 // RUN: %clang -### -target amdgcn-mesa-mesa3d -c %s 2>&1 \
138 // RUN: | FileCheck --check-prefix=CHECK-NO-MATH-ERRNO %s
140 // Check that -ffast-math disables -fmath-errno, and -fno-fast-math merely
141 // preserves the target default. Also check various flag set operations between
142 // the two flags. (Resuses above checks.)
143 // RUN: %clang -### -ffast-math -c %s 2>&1 \
144 // RUN: | FileCheck --check-prefix=CHECK-NO-MATH-ERRNO %s
145 // RUN: %clang -### -fmath-errno -ffast-math -c %s 2>&1 \
146 // RUN: | FileCheck --check-prefix=CHECK-NO-MATH-ERRNO %s
147 // RUN: %clang -### -ffast-math -fmath-errno -c %s 2>&1 \
148 // RUN: | FileCheck --check-prefix=CHECK-MATH-ERRNO %s
149 // RUN: %clang -### -target i686-unknown-linux -fno-fast-math -c %s 2>&1 \
150 // RUN: | FileCheck --check-prefix=CHECK-MATH-ERRNO %s
151 // RUN: %clang -### -target i686-unknown-linux -fno-math-errno -fno-fast-math -c %s 2>&1 \
152 // RUN: | FileCheck --check-prefix=CHECK-MATH-ERRNO %s
153 // RUN: %clang -### -target i686-apple-darwin -fno-fast-math -c %s 2>&1 \
154 // RUN: | FileCheck --check-prefix=CHECK-NO-MATH-ERRNO %s
155 // RUN: %clang -### -target i686-apple-darwin -fno-math-errno -fno-fast-math -c %s 2>&1 \
156 // RUN: | FileCheck --check-prefix=CHECK-NO-MATH-ERRNO %s
157 // RUN: %clang -### -fno-fast-math -fno-math-errno -c %s 2>&1 \
158 // RUN: | FileCheck --check-prefix=CHECK-NO-MATH-ERRNO %s
160 // RUN: %clang -### -fno-math-errno -fassociative-math -freciprocal-math \
161 // RUN: -fno-signed-zeros -fno-trapping-math -fapprox-func -c %s 2>&1 \
162 // RUN: | FileCheck --check-prefix=CHECK-UNSAFE-MATH %s
163 // CHECK-UNSAFE-MATH: "-cc1"
164 // CHECK-UNSAFE-MATH: "-funsafe-math-optimizations"
165 // CHECK-UNSAFE-MATH: "-mreassociate"
167 // RUN: %clang -### -fno-fast-math -fno-math-errno -fassociative-math -freciprocal-math \
168 // RUN: -fno-signed-zeros -fno-trapping-math -fapprox-func -c %s 2>&1 \
169 // RUN: | FileCheck --check-prefix=CHECK-NO-FAST-MATH-UNSAFE-MATH %s
170 // CHECK-NO-FAST-MATH-UNSAFE-MATH: "-cc1"
171 // CHECK-NO-FAST-MATH-UNSAFE-MATH: "-funsafe-math-optimizations"
172 // CHECK-NO-FAST-MATH-UNSAFE-MATH: "-mreassociate"
174 // The 2nd -fno-fast-math overrides -fassociative-math.
176 // RUN: %clang -### -fno-fast-math -fno-math-errno -fassociative-math -freciprocal-math \
177 // RUN: -fno-fast-math -fno-signed-zeros -fno-trapping-math -c %s 2>&1 \
178 // RUN: | FileCheck --check-prefix=CHECK-UNSAFE-MATH-NO-FAST-MATH %s
179 // CHECK-UNSAFE-MATH-NO-FAST-MATH: "-cc1"
180 // CHECK-UNSAFE-MATH-NO-FAST-MATH-NOT: "-funsafe-math-optimizations"
181 // CHECK-UNSAFE-MATH-NO-FAST-MATH-NOT: "-mreassociate"
183 // Check that various umbrella flags also enable these frontend options.
184 // RUN: %clang -### -ffast-math -c %s 2>&1 \
185 // RUN: | FileCheck --check-prefix=CHECK-NO-INFS %s
186 // RUN: %clang -### -ffast-math -c %s 2>&1 \
187 // RUN: | FileCheck --check-prefix=CHECK-NO-NANS %s
188 // RUN: %clang -### -ffast-math -c %s 2>&1 \
189 // RUN: | FileCheck --check-prefix=CHECK-UNSAFE-MATH %s
190 // RUN: %clang -### -ffinite-math-only -c %s 2>&1 \
191 // RUN: | FileCheck --check-prefix=CHECK-NO-INFS %s
192 // RUN: %clang -### -ffinite-math-only -c %s 2>&1 \
193 // RUN: | FileCheck --check-prefix=CHECK-NO-NANS %s
194 // RUN: %clang -### -funsafe-math-optimizations -fno-math-errno -c %s 2>&1 \
195 // RUN: | FileCheck --check-prefix=CHECK-UNSAFE-MATH %s
197 // One umbrella flag is *really* weird and also changes the semantics of the
198 // program by adding a special preprocessor macro. Check that the frontend flag
199 // modeling this semantic change is provided. Also check that the flag is not
200 // present if any of the optimizations are disabled.
201 // RUN: %clang -### -ffast-math -c %s 2>&1 \
202 // RUN: | FileCheck --check-prefix=CHECK-FAST-MATH %s
203 // RUN: %clang -### -fno-fast-math -ffast-math -c %s 2>&1 \
204 // RUN: | FileCheck --check-prefix=CHECK-FAST-MATH %s
205 // RUN: %clang -### -funsafe-math-optimizations -ffinite-math-only \
206 // RUN: -fno-math-errno -ffp-contract=fast -fno-rounding-math -c %s 2>&1 \
207 // RUN: | FileCheck --check-prefix=CHECK-FAST-MATH %s
208 // RUN: %clang -### -fno-honor-infinities -fno-honor-nans -fno-math-errno \
209 // RUN: -fassociative-math -freciprocal-math -fno-signed-zeros -fapprox-func \
210 // RUN: -fno-trapping-math -ffp-contract=fast -fno-rounding-math -c %s 2>&1 \
211 // RUN: | FileCheck --check-prefix=CHECK-FAST-MATH %s
212 // CHECK-FAST-MATH: "-cc1"
213 // CHECK-FAST-MATH: "-ffast-math"
214 // CHECK-FAST-MATH: "-ffinite-math-only"
216 // RUN: %clang -### -ffast-math -fno-fast-math -c %s 2>&1 \
217 // RUN: | FileCheck --check-prefix=CHECK-NO-FAST-MATH %s
218 // RUN: %clang -### -ffast-math -fno-finite-math-only -c %s 2>&1 \
219 // RUN: | FileCheck --check-prefix=CHECK-NO-FAST-MATH %s
220 // RUN: %clang -### -ffast-math -fno-unsafe-math-optimizations -c %s 2>&1 \
221 // RUN: | FileCheck --check-prefix=CHECK-NO-FAST-MATH %s
222 // RUN: %clang -### -ffast-math -fmath-errno -c %s 2>&1 \
223 // RUN: | FileCheck --check-prefix=CHECK-NO-FAST-MATH %s
224 // RUN: %clang -### -ffast-math -fno-associative-math -c %s 2>&1 \
225 // RUN: | FileCheck --check-prefix=CHECK-NO-FAST-MATH --check-prefix=CHECK-ASSOC-MATH %s
226 // CHECK-NO-FAST-MATH: "-cc1"
227 // CHECK-NO-FAST-MATH-NOT: "-ffast-math"
228 // CHECK-ASSOC-MATH-NOT: "-mreassociate"
230 // Check various means of disabling these flags, including disabling them after
231 // they've been enabled via an umbrella flag.
232 // RUN: %clang -### -fno-honor-infinities -fhonor-infinities -c %s 2>&1 \
233 // RUN: | FileCheck --check-prefix=CHECK-NO-NO-INFS %s
234 // RUN: %clang -### -ffinite-math-only -fhonor-infinities -c %s 2>&1 \
235 // RUN: | FileCheck --check-prefix=CHECK-NO-NO-INFS %s
236 // RUN: %clang -### -ffinite-math-only -fno-finite-math-only -c %s 2>&1 \
237 // RUN: | FileCheck --check-prefix=CHECK-NO-NO-INFS %s
238 // RUN: %clang -### -ffast-math -fhonor-infinities -c %s 2>&1 \
239 // RUN: | FileCheck --check-prefix=CHECK-NO-NO-INFS %s
240 // RUN: %clang -### -ffast-math -fno-finite-math-only -c %s 2>&1 \
241 // RUN: | FileCheck --check-prefix=CHECK-NO-NO-INFS %s
242 // CHECK-NO-NO-INFS: "-cc1"
243 // CHECK-NO-NO-INFS-NOT: "-menable-no-infs"
244 // CHECK-NO-NO-INFS-NOT: "-ffinite-math-only"
245 // CHECK-NO-NO-INFS: "-o"
247 // RUN: %clang -### -fno-honor-nans -fhonor-nans -c %s 2>&1 \
248 // RUN: | FileCheck --check-prefix=CHECK-NO-NO-NANS %s
249 // RUN: %clang -### -ffinite-math-only -fhonor-nans -c %s 2>&1 \
250 // RUN: | FileCheck --check-prefix=CHECK-NO-NO-NANS %s
251 // RUN: %clang -### -ffinite-math-only -fno-finite-math-only -c %s 2>&1 \
252 // RUN: | FileCheck --check-prefix=CHECK-NO-NO-NANS %s
253 // RUN: %clang -### -ffast-math -fhonor-nans -c %s 2>&1 \
254 // RUN: | FileCheck --check-prefix=CHECK-NO-NO-NANS %s
255 // RUN: %clang -### -ffast-math -fno-finite-math-only -c %s 2>&1 \
256 // RUN: | FileCheck --check-prefix=CHECK-NO-NO-NANS %s
257 // CHECK-NO-NO-NANS: "-cc1"
258 // CHECK-NO-NO-NANS-NOT: "-menable-no-nans"
259 // CHECK-NO-NO-NANS-NOT: "-ffinite-math-only"
260 // CHECK-NO-NO-NANS: "-o"
262 // A later inverted option overrides an earlier option.
264 // RUN: %clang -### -fassociative-math -freciprocal-math -fno-signed-zeros \
265 // RUN: -fno-trapping-math -fno-associative-math -c %s 2>&1 \
266 // RUN: | FileCheck --check-prefix=CHECK-NO-UNSAFE-MATH %s
268 // RUN: %clang -### -funsafe-math-optimizations -fno-associative-math -c %s \
269 // RUN: 2>&1 | FileCheck --check-prefix=CHECK-NO-UNSAFE-MATH %s
271 // RUN: %clang -### -funsafe-math-optimizations -fno-reciprocal-math -c %s \
272 // RUN: 2>&1 | FileCheck --check-prefix=CHECK-NO-UNSAFE-MATH %s
273 // RUN: %clang -### -funsafe-math-optimizations -fsigned-zeros -c %s 2>&1 \
274 // RUN: | FileCheck --check-prefix=CHECK-NO-UNSAFE-MATH %s
275 // RUN: %clang -### -funsafe-math-optimizations -ftrapping-math -c %s 2>&1 \
276 // RUN: | FileCheck --check-prefix=CHECK-NO-UNSAFE-MATH %s
277 // RUN: %clang -### -funsafe-math-optimizations -fno-unsafe-math-optimizations \
278 // RUN: -c %s 2>&1 \
279 // RUN: | FileCheck --check-prefix=CHECK-NO-UNSAFE-MATH %s
280 // RUN: %clang -### -ffast-math -fno-associative-math -c %s 2>&1 \
281 // RUN: | FileCheck --check-prefix=CHECK-NO-UNSAFE-MATH %s
283 // RUN: %clang -### -ffast-math -fno-reciprocal-math -c %s 2>&1 \
284 // RUN: | FileCheck --check-prefix=CHECK-NO-UNSAFE-MATH %s
285 // RUN: %clang -### -ffast-math -fsigned-zeros -c %s 2>&1 \
286 // RUN: | FileCheck --check-prefix=CHECK-NO-UNSAFE-MATH %s
287 // RUN: %clang -### -ffast-math -ftrapping-math -c %s 2>&1 \
288 // RUN: | FileCheck --check-prefix=CHECK-NO-UNSAFE-MATH %s
289 // RUN: %clang -### -ffast-math -fno-unsafe-math-optimizations -c %s 2>&1 \
290 // RUN: | FileCheck --check-prefix=CHECK-NO-UNSAFE-MATH %s
292 // CHECK-NO-UNSAFE-MATH: "-cc1"
293 // CHECK-NO-UNSAFE-MATH-NOT: "-funsafe-math-optimizations"
294 // CHECK-NO_UNSAFE-MATH-NOT: "-mreassociate"
295 // CHECK-NO-UNSAFE-MATH: "-o"
298 // Reassociate is allowed because it does not require reciprocal-math.
300 // RUN: %clang -### -fassociative-math -freciprocal-math -fno-signed-zeros \
301 // RUN: -fno-trapping-math -fno-reciprocal-math -c %s 2>&1 \
302 // RUN: | FileCheck --check-prefix=CHECK-REASSOC-NO-UNSAFE-MATH %s
304 // CHECK-REASSOC-NO-UNSAFE-MATH: "-cc1"
305 // CHECK-REASSOC-NO_UNSAFE-MATH-NOT: "-funsafe-math-optimizations"
306 // CHECK-REASSOC-NO_UNSAFE-MATH: "-mreassociate"
307 // CHECK-REASSOC-NO-UNSAFE-MATH-NOT: "-funsafe-math-optimizations"
308 // CHECK-REASSOC-NO-UNSAFE-MATH: "-o"
311 // In these runs, reassociate is not allowed because both no-signed-zeros and no-trapping-math are required.
313 // RUN: %clang -### -fassociative-math -freciprocal-math -fno-signed-zeros \
314 // RUN: -fno-trapping-math -fsigned-zeros -c %s 2>&1 \
315 // RUN: | FileCheck --check-prefix=CHECK-NO-REASSOC-NO-UNSAFE-MATH %s
317 // RUN: %clang -### -fassociative-math -freciprocal-math -fno-signed-zeros \
318 // RUN: -fno-trapping-math -ftrapping-math -c %s 2>&1 \
319 // RUN: | FileCheck --check-prefix=CHECK-NO-REASSOC-NO-UNSAFE-MATH %s
321 // CHECK-NO-REASSOC-NO-UNSAFE-MATH: "-cc1"
322 // CHECK-NO-REASSOC-NO_UNSAFE-MATH-NOT: "-funsafe-math-optimizations"
323 // CHECK-NO-REASSOC-NO_UNSAFE-MATH-NOT: "-mreassociate"
324 // CHECK-NO-REASSOC-NO_UNSAFE-MATH-NOT: "-funsafe-math-optimizations"
325 // CHECK-NO-REASSOC-NO-UNSAFE-MATH: "-o"
328 // This isn't fast-math, but the option is handled in the same place as other FP params.
329 // Last option wins, and strict behavior is assumed by default.
331 // RUN: %clang -### -fno-strict-float-cast-overflow -c %s 2>&1 \
332 // RUN: | FileCheck --check-prefix=CHECK-FPOV-WORKAROUND %s
333 // CHECK-FPOV-WORKAROUND: "-cc1"
334 // CHECK-FPOV-WORKAROUND: "-fno-strict-float-cast-overflow"
336 // RUN: %clang -### -c %s 2>&1 \
337 // RUN: | FileCheck --check-prefix=CHECK-FPOV-WORKAROUND-DEFAULT %s
338 // CHECK-FPOV-WORKAROUND-DEFAULT: "-cc1"
339 // CHECK-FPOV-WORKAROUND-DEFAULT-NOT: "strict-float-cast-overflow"
341 // RUN: %clang -### -fstrict-float-cast-overflow -c %s 2>&1 \
342 // RUN: | FileCheck --check-prefix=CHECK-NO-FPOV-WORKAROUND %s
343 // CHECK-NO-FPOV-WORKAROUND: "-cc1"
344 // CHECK-NO-FPOV-WORKAROUND-NOT: "strict-float-cast-overflow"
346 // RUN: %clang -### -fno-strict-float-cast-overflow -fstrict-float-cast-overflow -c %s 2>&1 \
347 // RUN: | FileCheck --check-prefix=CHECK-NO-FPOV-WORKAROUND-OVERRIDE %s
348 // CHECK-NO-FPOV-WORKAROUND-OVERRIDE: "-cc1"
349 // CHECK-NO-FPOV-WORKAROUND-OVERRIDE-NOT: "strict-float-cast-overflow"