[testsuite] require sqrt_insn effective target where needed
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / vec-extract-uint-1.c
bloba2d7c794d08aa8db3369574948583193e7274917
1 /* Test to verify that the vec_extract from a vector of
2 unsigned ints remains unsigned. */
3 /* { dg-do run } */
4 /* { dg-options "-ansi -mdejagnu-cpu=power8 " } */
5 /* { dg-require-effective-target p8vector_hw } */
7 #include <altivec.h>
8 #include <stdio.h>
9 #include <stdlib.h>
11 int test1(unsigned int ui) {
12 long long int uie;
14 vector unsigned int v = vec_splats(ui);
15 uie = vec_extract(v,0);
17 if (uie != ui)
18 abort();
19 return 0;
22 int main()
24 test1 (0xf6000000);
25 test1 (0x76000000);
26 test1 (0x06000000);
27 return 0;