| 1 |
// Note: %s must be preceded by --, otherwise it may be interpreted as a |
| 2 |
// command-line option, e.g. on Mac where %s is commonly under /Users. |
| 3 |
|
| 4 |
// RUN: %clang -### --target=i386 -fexcess-precision=fast -c %s 2>&1 \ |
| 5 |
// RUN: | FileCheck --check-prefix=CHECK-FAST %s |
| 6 |
// RUN: %clang_cl -### --target=i386 -fexcess-precision=fast -c -- %s 2>&1 \ |
| 7 |
// RUN: | FileCheck --check-prefix=CHECK-FAST %s |
| 8 |
|
| 9 |
// RUN: %clang -### --target=i386 -fexcess-precision=standard -c %s 2>&1 \ |
| 10 |
// RUN: | FileCheck --check-prefix=CHECK-STD %s |
| 11 |
// RUN: %clang_cl -### --target=i386 -fexcess-precision=standard -c -- %s 2>&1 \ |
| 12 |
// RUN: | FileCheck --check-prefix=CHECK-STD %s |
| 13 |
|
| 14 |
// RUN: %clang -### --target=i386 -fexcess-precision=16 -c %s 2>&1 \ |
| 15 |
// RUN: | FileCheck --check-prefix=CHECK-NONE %s |
| 16 |
// RUN: %clang_cl -### --target=i386 -fexcess-precision=16 -c -- %s 2>&1 \ |
| 17 |
// RUN: | FileCheck --check-prefix=CHECK-NONE %s |
| 18 |
|
| 19 |
// RUN: not %clang -### --target=i386 -fexcess-precision=none -c %s 2>&1 \ |
| 20 |
// RUN: | FileCheck --check-prefix=CHECK-ERR-NONE %s |
| 21 |
// RUN: not %clang_cl -### --target=i386 -fexcess-precision=none -c -- %s 2>&1 \ |
| 22 |
// RUN: | FileCheck --check-prefix=CHECK-ERR-NONE %s |
| 23 |
|
| 24 |
// RUN: %clang -### --target=x86_64 -fexcess-precision=fast -c %s 2>&1 \ |
| 25 |
// RUN: | FileCheck --check-prefix=CHECK-FAST %s |
| 26 |
// RUN: %clang_cl -### --target=x86_64 -fexcess-precision=fast -c -- %s 2>&1 \ |
| 27 |
// RUN: | FileCheck --check-prefix=CHECK-FAST %s |
| 28 |
|
| 29 |
// RUN: %clang -### --target=x86_64 -fexcess-precision=standard -c %s 2>&1 \ |
| 30 |
// RUN: | FileCheck --check-prefix=CHECK-STD %s |
| 31 |
// RUN: %clang_cl -### --target=x86_64 -fexcess-precision=standard -c \ |
| 32 |
// RUN: -- %s 2>&1 | FileCheck --check-prefix=CHECK-STD %s |
| 33 |
|
| 34 |
// RUN: %clang -### --target=x86_64 -fexcess-precision=16 -c %s 2>&1 \ |
| 35 |
// RUN: | FileCheck --check-prefix=CHECK-NONE %s |
| 36 |
// RUN: %clang_cl -### --target=x86_64 -fexcess-precision=16 -c -- %s 2>&1 \ |
| 37 |
// RUN: | FileCheck --check-prefix=CHECK-NONE %s |
| 38 |
|
| 39 |
// RUN: not %clang -### --target=x86_64 -fexcess-precision=none -c %s 2>&1 \ |
| 40 |
// RUN: | FileCheck --check-prefixes=CHECK-ERR-NONE %s |
| 41 |
// RUN: not %clang_cl -### --target=x86_64 -fexcess-precision=none -c -- %s 2>&1 \ |
| 42 |
// RUN: | FileCheck --check-prefixes=CHECK-ERR-NONE %s |
| 43 |
|
| 44 |
// RUN: %clang -### --target=aarch64 -fexcess-precision=fast -c %s 2>&1 \ |
| 45 |
// RUN: | FileCheck --check-prefix=CHECK %s |
| 46 |
// RUN: %clang_cl -### --target=aarch64 -fexcess-precision=fast -c -- %s 2>&1 \ |
| 47 |
// RUN: | FileCheck --check-prefix=CHECK %s |
| 48 |
|
| 49 |
// RUN: %clang -### --target=aarch64 -fexcess-precision=standard -c %s 2>&1 \ |
| 50 |
// RUN: | FileCheck --check-prefix=CHECK %s |
| 51 |
// RUN: %clang_cl -### --target=aarch64 -fexcess-precision=standard -c \ |
| 52 |
// RUN: -- %s 2>&1 | FileCheck --check-prefix=CHECK %s |
| 53 |
|
| 54 |
// RUN: not %clang -### --target=aarch64 -fexcess-precision=16 -c %s 2>&1 \ |
| 55 |
// RUN: | FileCheck --check-prefix=CHECK-ERR-16 %s |
| 56 |
// RUN: not %clang_cl -### --target=aarch64 -fexcess-precision=16 -c -- %s 2>&1 \ |
| 57 |
// RUN: | FileCheck --check-prefix=CHECK-ERR-16 %s |
| 58 |
|
| 59 |
// RUN: not %clang -### --target=aarch64 -fexcess-precision=none -c %s 2>&1 \ |
| 60 |
// RUN: | FileCheck --check-prefix=CHECK-ERR-NONE %s |
| 61 |
// RUN: not %clang_cl -### --target=aarch64 -fexcess-precision=none -c -- %s 2>&1 \ |
| 62 |
// RUN: | FileCheck --check-prefix=CHECK-ERR-NONE %s |
| 63 |
|
| 64 |
// CHECK-FAST: "-ffloat16-excess-precision=fast" |
| 65 |
// CHECK-FAST: "-fbfloat16-excess-precision=fast" |
| 66 |
// CHECK-STD: "-ffloat16-excess-precision=standard" |
| 67 |
// CHECK-STD: "-fbfloat16-excess-precision=standard" |
| 68 |
// CHECK-NONE: "-ffloat16-excess-precision=none" |
| 69 |
// CHECK-NONE: "-fbfloat16-excess-precision=none" |
| 70 |
// CHECK-ERR-NONE: unsupported argument 'none' to option '-fexcess-precision=' |
| 71 |
// CHECK: "-cc1" |
| 72 |
// CHECK-NOT: "-ffloat16-excess-precision=fast" |
| 73 |
// CHECK-NOT: "-fbfloat16-excess-precision=fast" |
| 74 |
// CHECK-ERR-16: unsupported argument '16' to option '-fexcess-precision=' |