[RS6000] Tests that use int128_t and -m32
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / vec-extract-sint128-1.c
blob7d8582aa557ffa9bf2e69837776c91ea193ee23d
1 /* Test to verify that the vec_extract from a vector of
2 signed __int128s remains signed. */
3 /* { dg-do run { target int128 } } */
4 /* { dg-options "-ansi -mdejagnu-cpu=power8 " } */
5 /* { dg-require-effective-target p8vector_hw } */
7 #include <altivec.h>
8 #include <stdio.h>
9 #include <stdlib.h>
11 int test1(signed __int128 st) {
13 vector signed __int128 v = vec_splats(st);
15 if (vec_extract (v, 0) > st)
16 abort();
17 return 0;
20 int main()
22 test1 (((__int128) 0xf600000000000000LL) << 64);
23 test1 (((__int128) 0x7600000000000000LL) << 64);
24 test1 (((__int128) 0x0600000000000000LL) << 64);
25 return 0;