1 /* Test to verify that the vec_extract from a vector of 2 signed ints remains signed. */ 3 /* { dg-do run } */ 4 /* { dg-options "-ansi -mdejagnu-cpu=power8 " } */ 5 /* { dg-require-effective-target p8vector_hw } */ 6 7 #include <altivec.h> 8 #include <stdio.h> 9 #include <stdlib.h> 10 test1(signed int si)11int test1(signed int si) { 12 long long int sie; 13 14 vector signed int v = vec_splats(si); 15 sie = vec_extract(v,0); 16 17 if (sie != si) 18 abort(); 19 return 0; 20 } 21 main()22int main() 23 { 24 test1 (0xf6000000); 25 test1 (0x76000000); 26 test1 (0x06000000); 27 return 0; 28 } 29