summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/builtins-ppc-error.c
diff options
context:
space:
mode:
authorQingShan Zhang <qshanz@cn.ibm.com>2018-09-20 05:04:57 +0000
committerQingShan Zhang <qshanz@cn.ibm.com>2018-09-20 05:04:57 +0000
commitaccb65b994074caba156d35ead9c7b50f6c320ac (patch)
tree23e50a797b34a798a408f5d7e572e49ae3b49d82 /clang/test/CodeGen/builtins-ppc-error.c
parentb569e7e828bb4e89b69e1e1620693a26d8da2dfa (diff)
downloadbcm5719-llvm-accb65b994074caba156d35ead9c7b50f6c320ac.tar.gz
bcm5719-llvm-accb65b994074caba156d35ead9c7b50f6c320ac.zip
[PowerPC] [Clang] Add vector int128 pack/unpack builtins
unsigned long long builtin_unpack_vector_int128 (vector int128_t, int); vector int128_t builtin_pack_vector_int128 (unsigned long long, unsigned long long); Builtins should behave the same way as in GCC. Patch By: wuzish (Zixuan Wu) Differential Revision: https://reviews.llvm.org/D52074 llvm-svn: 342614
Diffstat (limited to 'clang/test/CodeGen/builtins-ppc-error.c')
-rw-r--r--clang/test/CodeGen/builtins-ppc-error.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/test/CodeGen/builtins-ppc-error.c b/clang/test/CodeGen/builtins-ppc-error.c
index 29eebf28610..a50dc2cba02 100644
--- a/clang/test/CodeGen/builtins-ppc-error.c
+++ b/clang/test/CodeGen/builtins-ppc-error.c
@@ -14,6 +14,7 @@ extern vector signed int vsi;
extern vector signed int vui;
extern vector float vf;
extern vector unsigned char vuc;
+extern vector signed __int128 vsllli;
void testInsertWord(void) {
int index = 5;
@@ -67,3 +68,8 @@ void testCTU(int index) {
void testVCTUXS(int index) {
vec_vctuxs(vf, index); //expected-error {{argument to '__builtin_altivec_vctuxs' must be a constant integer}}
}
+
+void testUnpack128(int index) {
+ __builtin_unpack_vector_int128(vsllli, index); //expected-error {{argument to '__builtin_unpack_vector_int128' must be a constant integer}}
+ __builtin_unpack_vector_int128(vsllli, 5); //expected-error {{argument value 5 is outside the valid range [0, 1]}}
+}
OpenPOWER on IntegriCloud