[testsuite] require sqrt_insn effective target where needed
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / vec-strir_p-8.c
blob0338ad8df3f44c466416347d7616dfdb1cb58faf
1 /* { dg-do compile } */
2 /* { dg-options "-mdejagnu-cpu=power10" } */
4 #include <altivec.h>
6 extern void abort (void);
8 int main (int argc, char *argv [])
10 vector unsigned char input1 =
11 { 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8,
12 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf, 0x11 };
13 vector unsigned char input2 =
14 { 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8,
15 0x9, 0xa, 0xb, 0xc, 0xd, 0x0, 0xf, 0x11 };
16 vector unsigned char input3 =
17 { 0x1, 0x2, 0x0, 0x4, 0x5, 0x6, 0x7, 0x8,
18 0x9, 0xa, 0xb, 0xc, 0xd, 0x0, 0xf, 0x11 };
19 vector unsigned char input4 =
20 { 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8,
21 0x9, 0xa, 0xb, 0xc, 0xd, 0x0, 0xf, 0x11 };
23 if (!vec_strir_p (input1))
24 abort ();
25 if (!vec_strir_p (input2))
26 abort ();
27 if (!vec_strir_p (input3))
28 abort ();
29 if (!vec_strir_p (input4))
30 abort ();
33 /* Enforce that exactly four dot-form instructions which are properly biased
34 for the target's endianness implement this built-in. */
36 /* { dg-final { scan-assembler-times {\mvstribr\.} 4 { target { be } } } } */
37 /* { dg-final { scan-assembler-times {\mvstribr\M[^.]} 0 { target { be } } } } */
38 /* { dg-final { scan-assembler-times {\mvstribl} 0 { target { be } } } } */
39 /* { dg-final { scan-assembler-times {\mvstribl\.} 4 { target { le } } } } */
40 /* { dg-final { scan-assembler-times {\mvstribl\M[^.]} 0 { target { le } } } } */
41 /* { dg-final { scan-assembler-times {\mvstribr} 0 { target { le } } } } */