1 /* Verify that overloaded built-ins for vec_splat with pixel
2 inputs produce the right code. */
4 /* { dg-do compile } */
5 /* { dg-require-effective-target powerpc_vsx_ok } */
6 /* { dg-options "-mvsx -O2" } */
10 vector pixel
test1_00 (vector pixel x
) { return vec_splat (x
, 0b00000); }
11 vector pixel
test1_01 (vector pixel x
) { return vec_splat (x
, 0b00001); }
12 vector pixel
test1_02 (vector pixel x
) { return vec_splat (x
, 0b00010); }
13 vector pixel
test1_04 (vector pixel x
) { return vec_splat (x
, 0b00100); }
15 /* Similar test as above, but the source vector is a known constant. */
16 vector pixel
test_p () { const vector pixel y
= { 1,2,3,4}; return vec_splat (y
, 0b00010); }
18 /* { dg-final { scan-assembler-times "vspltish" 1 } } */
19 /* { dg-final { scan-assembler-times "vsplth" 4 } } */