diff options
author | QingShan Zhang <qshanz@cn.ibm.com> | 2018-09-20 05:04:57 +0000 |
---|---|---|
committer | QingShan Zhang <qshanz@cn.ibm.com> | 2018-09-20 05:04:57 +0000 |
commit | accb65b994074caba156d35ead9c7b50f6c320ac (patch) | |
tree | 23e50a797b34a798a408f5d7e572e49ae3b49d82 /clang/test/CodeGen/builtins-ppc-error.c | |
parent | b569e7e828bb4e89b69e1e1620693a26d8da2dfa (diff) | |
download | bcm5719-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.c | 6 |
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]}} +} |