[RS6000] Tests that use int128_t and -m32
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / vec-stril_p-3.c
blob8fb3fe712397890c23fc458f4395c643c7c0cae9
1 /* { dg-do run { target { power10_hw } } } */
2 /* { dg-do link { target { ! power10_hw } } } */
3 /* { dg-require-effective-target power10_ok } */
4 /* { dg-options "-mdejagnu-cpu=power10" } */
6 #include <altivec.h>
8 extern void abort (void);
10 /* Vector string isolate right-justified on array of signed char. */
11 int
12 silj_p (vector signed char arg)
14 return vec_stril_p (arg);
17 int main (int argc, char *argv [])
19 vector signed char input1 =
20 { 0x1, 0x2, 0xf3, 0x4, 0x5, 0x6, 0x7, 0x8,
21 0x9, 0xa, 0xb, 0xc, 0xd, 0xe2, 0xf, 0x11 };
22 vector signed char input2 =
23 { 0x1, 0x2, 0xf3, 0x4, 0x5, 0x6, 0x7, 0x8,
24 0x9, 0xa, 0xb, 0xc, 0xd, 0x0, 0xf, 0x11 };
25 vector signed char input3 =
26 { 0x1, 0x2, 0xf3, 0x0, 0x5, 0x6, 0x7, 0x8,
27 0x9, 0xa, 0xb, 0xc, 0xd, 0xe2, 0x0, 0x11 };
28 vector signed char input4 =
29 { 0x1, 0x2, 0xf3, 0x4, 0x5, 0x6, 0x7, 0x8,
30 0x9, 0xa, 0xb, 0xc, 0xd, 0xe2, 0x0, 0x11 };
32 if (silj_p (input1))
33 abort ();
34 if (!silj_p (input2))
35 abort ();
36 if (!silj_p (input3))
37 abort ();
38 if (!silj_p (input4))
39 abort ();