diff options
author | Nemanja Ivanovic <nemanja.i.ibm@gmail.com> | 2016-09-27 10:45:22 +0000 |
---|---|---|
committer | Nemanja Ivanovic <nemanja.i.ibm@gmail.com> | 2016-09-27 10:45:22 +0000 |
commit | 10e2b5dcaa75eb3bd6180b8d16aee58a8027ca19 (patch) | |
tree | 4ed77025ce241b54377306df635edff82d918fe4 /clang/test/Driver/ppc-dependent-options.cpp | |
parent | 54f8efaa2634415e9c487b9c5169a898a56fc96e (diff) | |
download | bcm5719-llvm-10e2b5dcaa75eb3bd6180b8d16aee58a8027ca19.tar.gz bcm5719-llvm-10e2b5dcaa75eb3bd6180b8d16aee58a8027ca19.zip |
[Power9] Builtins for ELF v.2 ABI conformance - front end portion
This patch corresponds to review:
https://reviews.llvm.org/D24397
It adds the __POWER9_VECTOR__ macro and the -mpower9-vector option along with
a number of altivec.h functions (refer to the code review for a list).
llvm-svn: 282481
Diffstat (limited to 'clang/test/Driver/ppc-dependent-options.cpp')
-rw-r--r-- | clang/test/Driver/ppc-dependent-options.cpp | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/clang/test/Driver/ppc-dependent-options.cpp b/clang/test/Driver/ppc-dependent-options.cpp index b4dcaf6d9bf..9fb812dc218 100644 --- a/clang/test/Driver/ppc-dependent-options.cpp +++ b/clang/test/Driver/ppc-dependent-options.cpp @@ -42,6 +42,18 @@ // RUN: -mcpu=power6 -std=c++11 -mdirect-move %s 2>&1 | FileCheck %s \ // RUN: -check-prefix=CHECK-VSX +// RUN: not %clang -target powerpc64le-unknown-unknown -fsyntax-only \ +// RUN: -mcpu=power9 -std=c++11 %s 2>&1 | FileCheck %s \ +// RUN: -check-prefix=CHECK-DEFAULT-P9 + +// RUN: not %clang -target powerpc64le-unknown-unknown -fsyntax-only \ +// RUN: -mcpu=power9 -std=c++11 -mno-vsx -mpower9-vector %s 2>&1 | \ +// RUN: FileCheck %s -check-prefix=CHECK-NVSX-P9V + +// RUN: not %clang -target powerpc64le-unknown-unknown -fsyntax-only \ +// RUN: -mcpu=power9 -std=c++11 -mno-vsx -mfloat128 %s 2>&1 | \ +// RUN: FileCheck %s -check-prefix=CHECK-NVSX-FLT128 + #ifdef __VSX__ static_assert(false, "VSX enabled"); #endif @@ -50,13 +62,21 @@ static_assert(false, "VSX enabled"); static_assert(false, "P8V enabled"); #endif -#if !defined(__VSX__) && !defined(__POWER8_VECTOR__) +#ifdef __POWER9_VECTOR__ +static_assert(false, "P9V enabled"); +#endif + +#if !defined(__VSX__) && !defined(__POWER8_VECTOR__) && \ + !defined(__POWER9_VECTOR__) static_assert(false, "Neither enabled"); #endif // CHECK-DEFAULT: VSX enabled // CHECK-DEFAULT: P8V enabled +// CHECK-DEFAULT-P9: P9V enabled // CHECK-NVSX-P8V: error: option '-mpower8-vector' cannot be specified with '-mno-vsx' +// CHECK-NVSX-P9V: error: option '-mpower9-vector' cannot be specified with '-mno-vsx' +// CHECK-NVSX-FLT128: error: option '-mfloat128' cannot be specified with '-mno-vsx' // CHECK-NVSX-DMV: error: option '-mdirect-move' cannot be specified with '-mno-vsx' // CHECK-NVSX: Neither enabled // CHECK-VSX: VSX enabled |