annotate gcc/testsuite/gcc.target/powerpc/vec-strir_p-3.c @ 19:2b5abeee2509 default tip

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
19
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
1 /* { dg-do run } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
2 /* { dg-require-effective-target powerpc_future_hw } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
3 /* { dg-options "-mdejagnu-cpu=future" } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
4
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
5 #include <altivec.h>
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
6
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
7 extern void abort (void);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
8
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
9 /* Vector string isolate right-justified on array of signed char. */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
10 int
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
11 sirj_p (vector signed char arg)
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
12 {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
13 return vec_strir_p (arg);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
14 }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
15
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
16 int main (int argc, char *argv [])
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
17 {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
18 vector signed char input1 =
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
19 { 0x1, 0x2, 0xf3, 0x4, 0x5, 0x6, 0x7, 0x8,
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
20 0x9, 0xa, 0xb, 0xc, 0xd, 0xe2, 0xf, 0x11 };
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
21 vector signed char input2 =
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
22 { 0x1, 0x2, 0xf3, 0x4, 0x5, 0x6, 0x7, 0x8,
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
23 0x9, 0xa, 0xb, 0xc, 0xd, 0x0, 0xf, 0x11 };
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
24 vector signed char input3 =
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
25 { 0x1, 0x2, 0xf3, 0x0, 0x5, 0x6, 0x7, 0x8,
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
26 0x9, 0xa, 0xb, 0xc, 0xd, 0xe2, 0x0, 0x11 };
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
27 vector signed char input4 =
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
28 { 0x1, 0x2, 0xf3, 0x4, 0x5, 0x6, 0x7, 0x8,
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
29 0x9, 0xa, 0xb, 0xc, 0xd, 0xe2, 0x0, 0x11 };
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
30
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
31 if (sirj_p (input1))
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
32 abort ();
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
33 if (!sirj_p (input2))
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
34 abort ();
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
35 if (!sirj_p (input3))
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
36 abort ();
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
37 if (!sirj_p (input4))
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
38 abort ();
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
39
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
40 }