Handle arithmetic on eliminated address indices [PR116413]
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / fold-vec-splat-16.c
blob345e96caaf1c016521a64162148c9c30e30c90dc
1 /* Verify that overloaded built-ins for vec_splat with int
2 inputs produce the right code. */
4 /* { dg-do compile } */
5 /* { dg-options "-mvsx -O2" } */
6 /* { dg-require-effective-target powerpc_vsx } */
8 #include <altivec.h>
10 vector signed short
11 testss_1 ()
13 return vec_splat_s16 (5);
16 vector signed short
17 testss_2 ()
19 return vec_splat_s16 (-5);
22 vector signed short
23 testss_3 ()
25 return vec_splat_s16 (15);
28 vector unsigned short
29 testus_1 ()
31 return vec_splat_u16 (5);
34 vector unsigned short
35 testus_2 ()
37 return vec_splat_u16 (-5);
40 vector unsigned short
41 testus_3 ()
43 return vec_splat_u16 (15);
46 /* { dg-final { scan-assembler-times "vspltish" 6 } } */