From accb65b994074caba156d35ead9c7b50f6c320ac Mon Sep 17 00:00:00 2001 From: QingShan Zhang Date: Thu, 20 Sep 2018 05:04:57 +0000 Subject: [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 --- clang/test/CodeGen/builtins-ppc-error.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'clang/test/CodeGen/builtins-ppc-error.c') 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]}} +} -- cgit v1.2.3