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