comparison gcc/testsuite/gcc.target/powerpc/vec-strir_p-7.c @ 152:2b5abeee2509

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents
children
comparison
equal deleted inserted replaced
145:1830386684a0 152:2b5abeee2509
1 /* { dg-do run } */
2 /* { dg-require-effective-target powerpc_future_hw } */
3 /* { dg-options "-mdejagnu-cpu=future" } */
4
5 #include <altivec.h>
6
7 extern void abort (void);
8
9 /* Vector string isolate right-justified on array of signed short. */
10 int
11 sirj_p (vector signed short arg)
12 {
13 return vec_strir_p (arg);
14 }
15
16 int main (int argc, short *argv [])
17 {
18 vector signed short input1 =
19 { 0x1, 0x3, 0x5, 0x7, 0x9, 0xb, 0xd, 0xf };
20 vector signed short input2 =
21 { 0x1, 0x0, 0x5, 0x7, 0x9, 0xb, 0xd, 0xf };
22 vector signed short input3 =
23 { 0x1, 0x0, 0x5, 0x7, 0x9, 0xb, 0xd, 0x0 };
24 vector signed short input4 =
25 { 0x1, 0x3, 0x5, 0x7, 0x9, 0xb, 0xd, 0x0 };
26
27 if (sirj_p (input1))
28 abort ();
29 if (!sirj_p (input2))
30 abort ();
31 if (!sirj_p (input3))
32 abort ();
33 if (!sirj_p (input4))
34 abort ();
35
36 }