[testsuite] require sqrt_insn effective target where needed
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / vec-extractl-be-1.c
blobe0cf29e5757dd8007aeb664f882f89877f4f8f6d
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 short source_a = { 0, 2, 4, 6, 8, 10, 12, 14 };
12 vector unsigned short source_b = { 16, 18, 20, 22, 24, 26, 28, 30 };
14 vector unsigned long long int result_1 = { 0, 14 };
15 vector unsigned long long int result_2 = { 0, 16 };
16 vector unsigned long long int result_3 = { 0, 24 };
17 vector unsigned long long int result_4 = { 0, 12 };
19 if (!vec_all_eq (vec_extractl (source_a, source_b, 14), result_1))
20 abort ();
21 if (!vec_all_eq (vec_extractl (source_a, source_b, 16), result_2))
22 abort ();
23 if (!vec_all_eq (vec_extractl (source_b, source_a, 8), result_3))
24 abort ();
25 if (!vec_all_eq (vec_extractl (source_b, source_a, 28), result_4))
26 abort ();
28 return 0;
31 /* { dg-final { scan-assembler {\mvextduhvlx\M} } } */