[testsuite] require sqrt_insn effective target where needed
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / vec-extractl-be-0.c
blob1ee1d0ef9d7fe28f671c778c7b6fa4e0637fab7d
1 /* { dg-options "-mdejagnu-cpu=power10" } */
2 /* { dg-additional-options "-mbig" { target powerpc64le-*-* } } */
4 #include <altivec.h>
6 extern void abort (void);
8 int
9 main (int argc, char *argv [])
11 vector unsigned char source_a = {
12 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 };
13 vector unsigned char source_b = {
14 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 };
16 vector unsigned long long int result_1 = { 0, 15 };
17 vector unsigned long long int result_2 = { 0, 16 };
18 vector unsigned long long int result_3 = { 0, 20 };
19 vector unsigned long long int result_4 = { 0, 8 };
21 if (!vec_all_eq (vec_extractl (source_a, source_b, 15), result_1))
22 abort ();
23 if (!vec_all_eq (vec_extractl (source_a, source_b, 16), result_2))
24 abort ();
25 if (!vec_all_eq (vec_extractl (source_b, source_a, 4), result_3))
26 abort ();
27 if (!vec_all_eq (vec_extractl (source_b, source_a, 24), result_4))
28 abort ();
30 return 0;
33 /* { dg-final { scan-assembler {\mvextdubvlx\M} } } */