1 /* Verify that overloaded built-ins for vec_unpackh and vec_unpackl with int 2 inputs produce the right code. */ 3 4 /* { dg-do compile } */ 5 /* { dg-require-effective-target powerpc_altivec_ok } */ 6 /* { dg-options "-maltivec -O2" } */ 7 8 #include <altivec.h> 9 10 vector bool int testbi_el(vector bool short vbs2)11testbi_el (vector bool short vbs2) 12 { 13 return vec_unpackl (vbs2); 14 } 15 16 vector signed int testsi_el(vector signed short vss2)17testsi_el (vector signed short vss2) 18 { 19 return vec_unpackl (vss2); 20 } 21 22 vector bool int testbi_eh(vector bool short vbs2)23testbi_eh (vector bool short vbs2) 24 { 25 return vec_unpackh (vbs2); 26 } 27 28 vector signed int testsi_eh(vector signed short vss2)29testsi_eh (vector signed short vss2) 30 { 31 return vec_unpackh (vss2); 32 } 33 34 /* { dg-final { scan-assembler-times "vupkhsh" 2 } } */ 35 /* { dg-final { scan-assembler-times "vupklsh" 2 } } */ 36 37