diagnostics: move output formats from diagnostic.{c,h} to their own files
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / vec-stril_p-1.c
blobca2c76cea5084d1080f2f7b12f7a8501e81337bc
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 left-justified predicate on array of
11 unsigned char. */
12 int
13 silj_p (vector unsigned char arg)
15 return vec_stril_p (arg);
18 int main (int argc, char *argv [])
20 vector unsigned char input1 =
21 { 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8,
22 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf, 0x11 };
23 vector unsigned char input2 =
24 { 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8,
25 0x9, 0xa, 0xb, 0xc, 0xd, 0x0, 0xf, 0x11 };
26 vector unsigned char input3 =
27 { 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8,
28 0x9, 0xa, 0xb, 0xc, 0xd, 0x0, 0xf, 0x11 };
29 vector unsigned char input4 =
30 { 0x1, 0x2, 0x0, 0x4, 0x5, 0x6, 0x7, 0x8,
31 0x9, 0xa, 0xb, 0xc, 0xd, 0x0, 0xf, 0x11 };
33 if (silj_p (input1))
34 abort ();
35 if (!silj_p (input2))
36 abort ();
37 if (!silj_p (input3))
38 abort ();
39 if (!silj_p (input4))
40 abort ();