diff options
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/Driver/ppc-f128-support-check.c | 20 | ||||
| -rw-r--r-- | clang/test/Preprocessor/init.c | 2 | ||||
| -rw-r--r-- | clang/test/Sema/float128-ld-incompatibility.cpp | 2 |
3 files changed, 22 insertions, 2 deletions
diff --git a/clang/test/Driver/ppc-f128-support-check.c b/clang/test/Driver/ppc-f128-support-check.c new file mode 100644 index 00000000000..24748905612 --- /dev/null +++ b/clang/test/Driver/ppc-f128-support-check.c @@ -0,0 +1,20 @@ +// RUN: not %clang -target powerpc64le-unknown-linux-gnu -fsyntax-only \ +// RUN: -mcpu=pwr9 -mfloat128 %s 2>&1 | FileCheck %s --check-prefix=HASF128 +// RUN: not %clang -target powerpc64le-unknown-linux-gnu -fsyntax-only \ +// RUN: -mcpu=power9 -mfloat128 %s 2>&1 | FileCheck %s --check-prefix=HASF128 + +// RUN: not %clang -target powerpc64le-unknown-linux-gnu -fsyntax-only \ +// RUN: -mcpu=pwr8 -mfloat128 %s 2>&1 | FileCheck %s --check-prefix=NOF128 +// RUN: not %clang -target powerpc64le-unknown-linux-gnu -fsyntax-only \ +// RUN: -mcpu=pwr7 -mfloat128 %s 2>&1 | FileCheck %s --check-prefix=NOF128 +// RUN: not %clang -target powerpc64le-unknown-linux-gnu -fsyntax-only \ +// RUN: -mfloat128 %s 2>&1 | FileCheck %s --check-prefix=NOF128 + +#ifdef __FLOAT128__ +static_assert(false, "__float128 enabled"); +#endif + +// HASF128: __float128 enabled +// HASF128-NOT: option '-mfloat128' cannot be specified with +// NOF128: option '-mfloat128' cannot be specified with + diff --git a/clang/test/Preprocessor/init.c b/clang/test/Preprocessor/init.c index 4adbcfce2e9..6dedf26a24f 100644 --- a/clang/test/Preprocessor/init.c +++ b/clang/test/Preprocessor/init.c @@ -6370,7 +6370,7 @@ // PPCPOWER9:#define _ARCH_PWR7 1 // PPCPOWER9:#define _ARCH_PWR9 1 // -// RUN: %clang_cc1 -E -dM -ffreestanding -triple=powerpc64-none-none -target-feature +float128 -target-cpu power8 -fno-signed-char < /dev/null | FileCheck -check-prefix PPC-FLOAT128 %s +// RUN: %clang_cc1 -E -dM -ffreestanding -triple=powerpc64-none-none -target-feature +float128 -target-cpu power9 -fno-signed-char < /dev/null | FileCheck -check-prefix PPC-FLOAT128 %s // PPC-FLOAT128:#define __FLOAT128__ 1 // // RUN: %clang_cc1 -E -dM -ffreestanding -triple=powerpc64-unknown-linux-gnu -fno-signed-char < /dev/null | FileCheck -match-full-lines -check-prefix PPC64-LINUX %s diff --git a/clang/test/Sema/float128-ld-incompatibility.cpp b/clang/test/Sema/float128-ld-incompatibility.cpp index 13f5b6d5d10..369b14a87e3 100644 --- a/clang/test/Sema/float128-ld-incompatibility.cpp +++ b/clang/test/Sema/float128-ld-incompatibility.cpp @@ -1,5 +1,5 @@ // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 \ -// RUN: -triple powerpc64le-unknown-linux-gnu -target-cpu pwr8 \ +// RUN: -triple powerpc64le-unknown-linux-gnu -target-cpu pwr9 \ // RUN: -target-feature +float128 %s // RUN: %clang_cc1 -fsyntax-only -std=c++11 -triple x86_64-unknown-linux-gnu -Wno-unused-value -Wno-parentheses %s |

