summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorBill Schmidt <wschmidt@linux.vnet.ibm.com>2014-10-10 15:09:43 +0000
committerBill Schmidt <wschmidt@linux.vnet.ibm.com>2014-10-10 15:09:43 +0000
commit59eb767e11d4ffefb5f55409524e5c8416b2b0db (patch)
treec916fe3386c4dd1b406fed694c1cf84cc4bda66e /clang/test
parentcfc4a54a48c3015bb732f62241d109b5df6dec43 (diff)
downloadbcm5719-llvm-59eb767e11d4ffefb5f55409524e5c8416b2b0db.tar.gz
bcm5719-llvm-59eb767e11d4ffefb5f55409524e5c8416b2b0db.zip
[PowerPC] Add feature for Power8 vector extensions
The current VSX feature for PowerPC specifies availability of the VSX instructions added with the 2.06 architecture version. With 2.07, the architecture adds new instructions to both the Category:Vector and Category:VSX instruction sets. Additionally, unaligned vector storage operations have improved performance. This patch adds a feature to provide access to the new instructions and performance capabilities of Power8. For compatibility with GCC, the feature is controlled via a new -mpower8-vector switch, and the feature causes the __POWER8_VECTOR__ builtin define to be generated by the preprocessor. There is a companion patch for llvm being committed at the same time. llvm-svn: 219502
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/Driver/ppc-features.cpp6
-rw-r--r--clang/test/Preprocessor/predefined-arch-macros.c7
2 files changed, 13 insertions, 0 deletions
diff --git a/clang/test/Driver/ppc-features.cpp b/clang/test/Driver/ppc-features.cpp
index c7b59cc7aaa..c62f5b96973 100644
--- a/clang/test/Driver/ppc-features.cpp
+++ b/clang/test/Driver/ppc-features.cpp
@@ -95,6 +95,12 @@
// RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-vsx -mvsx -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-VSX %s
// CHECK-VSX: "-target-feature" "+vsx"
+// RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-power8-vector -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-NOP8VECTOR %s
+// CHECK-NOP8VECTOR: "-target-feature" "-power8-vector"
+
+// RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-power8-vector -mpower8-vector -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-P8VECTOR %s
+// CHECK-P8VECTOR: "-target-feature" "+power8-vector"
+
// RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-crbits -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-NOCRBITS %s
// CHECK-NOCRBITS: "-target-feature" "-crbits"
diff --git a/clang/test/Preprocessor/predefined-arch-macros.c b/clang/test/Preprocessor/predefined-arch-macros.c
index 5f5380926dc..8b58c9ce01f 100644
--- a/clang/test/Preprocessor/predefined-arch-macros.c
+++ b/clang/test/Preprocessor/predefined-arch-macros.c
@@ -1652,3 +1652,10 @@
// RUN: | FileCheck %s -check-prefix=CHECK_PPC_VSX_M64
//
// CHECK_PPC_VSX_M64: #define __VSX__
+//
+// RUN: %clang -mpower8-vector -E -dM %s -o - 2>&1 \
+// RUN: -target powerpc64-unknown-linux \
+// RUN: | FileCheck %s -check-prefix=CHECK_PPC_POWER8_VECTOR_M64
+//
+// CHECK_PPC_POWER8_VECTOR_M64: #define __POWER8_VECTOR__
+//
OpenPOWER on IntegriCloud