Debian Codegraph @

gcc/testsuite/gcc.target/powerpc/vec-stril_p-9.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-mdejagnu-cpu=power10" } */
3
4 #include <altivec.h>
5
6 extern void abort (void);
7
8 int main (int argc, char *argv [])
9 {
10 vector signed char input1 =
11 { 0x1, 0x2, 0xf3, 0x4, 0x5, 0x6, 0x7, 0x8,
12 0x9, 0xa, 0xb, 0xc, 0xd, 0xe2, 0xf, 0x11 };
13 vector signed char input2 =
14 { 0x1, 0x2, 0xf3, 0x4, 0x5, 0x6, 0x7, 0x8,
15 0x9, 0xa, 0xb, 0xc, 0xd, 0x0, 0xf, 0x11 };
16 vector signed char input3 =
17 { 0x1, 0x2, 0xf3, 0x0, 0x5, 0x6, 0x7, 0x8,
18 0x9, 0xa, 0xb, 0xc, 0xd, 0xe2, 0x0, 0x11 };
19 vector signed char input4 =
20 { 0x1, 0x2, 0xf3, 0x4, 0x5, 0x6, 0x7, 0x8,
21 0x9, 0xa, 0xb, 0xc, 0xd, 0xe2, 0x0, 0x11 };
22
23 if (vec_stril_p (input1))
24 abort ();
25 if (!vec_stril_p (input2))
26 abort ();
27 if (!vec_stril_p (input3))
28 abort ();
29 if (!vec_stril_p (input4))
30 abort ();
31
32 }
33
34 /* Enforce that exactly four dot-form instructions which are properly biased
35 for the target's endianness implement this built-in. */
36
37 /* { dg-final { scan-assembler-times {\mvstribl\.} 4 { target { be } } } } */
38 /* { dg-final { scan-assembler-times {\mvstribl\M[^.]} 0 { target { be } } } } */
39 /* { dg-final { scan-assembler-times {\mvstribr} 0 { target { be } } } } */
40 /* { dg-final { scan-assembler-times {\mvstribr\.} 4 { target { le } } } } */
41 /* { dg-final { scan-assembler-times {\mvstribr\M[^.]} 0 { target { le } } } } */
42 /* { dg-final { scan-assembler-times {\mvstribl} 0 { target { le } } } } */