* gcc.target/powerpc/builtins-1-be.c <vclzb>: Rename duplicate test
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / fold-vec-shift-int.c
blobe9c5fe1ad33aae498d0c533cd284b03fb279a9eb
1 /* Verify that overloaded built-ins for vec_sl with int
2 inputs produce the right results. */
4 /* { dg-do compile } */
5 /* { dg-require-effective-target powerpc_altivec_ok } */
6 /* { dg-options "-maltivec -O2" } */
8 #include <altivec.h>
10 vector signed int
11 testsl_signed (vector signed int x, vector unsigned int y)
13 return vec_sl (x, y);
16 vector unsigned int
17 testsl_unsigned (vector unsigned int x, vector unsigned int y)
19 return vec_sl (x, y);
22 vector signed int
23 testsr_signed (vector signed int x, vector unsigned int y)
25 return vec_sr (x, y);
28 vector unsigned int
29 testsr_unsigned (vector unsigned int x, vector unsigned int y)
31 return vec_sr (x, y);
34 vector signed int
35 testsra_signed (vector signed int x, vector unsigned int y)
37 return vec_sra (x, y);
40 vector unsigned int
41 testsra_unsigned (vector unsigned int x, vector unsigned int y)
43 return vec_sra (x, y);
46 vector signed int
47 testrl_signed (vector signed int x, vector unsigned int y)
49 return vec_rl (x, y);
52 vector unsigned int
53 testrl_unsigned (vector unsigned int x, vector unsigned int y)
55 return vec_rl (x, y);
58 /* { dg-final { scan-assembler-times "vslw" 2 } } */
59 /* { dg-final { scan-assembler-times "vsrw" 2 } } */
60 /* { dg-final { scan-assembler-times "vsraw" 2 } } */
61 /* { dg-final { scan-assembler-times "vrlw" 2 } } */