c++: normalizing ttp constraints [PR115656]
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / pr86731-longlong.c
blobc97cb49de8cfe42977a8be0602c8a2dce84150c9
1 /* PR86731. Verify that the rs6000 gimple-folding code handles the
2 left shift properly. */
4 /* { dg-do compile } */
5 /* { dg-options "-maltivec -O3 -mvsx " } */
6 /* { dg-additional-options "-mdejagnu-cpu=power8" { target { ! has_arch_pwr8 } } } */
7 /* { dg-require-effective-target powerpc_vsx } */
8 /* { dg-require-effective-target lp64 } */
10 #include <altivec.h>
12 vector unsigned long long splatu4(void)
14 vector unsigned long long mzero = {-1,-1};
15 return (vector unsigned long long) vec_sl(mzero, mzero);
17 vector signed long long splats4(void)
19 vector unsigned long long mzero = {-1,-1};
20 return (vector signed long long) vec_sl(mzero, mzero);
23 /* Codegen will consist of splat and shift instructions for most types.
24 Noted variations: if gimple folding is disabled, or if -fwrapv is not
25 specified, the long long tests will generate a vspltisw+vsld pair,
26 versus generating a single lvx. */
27 /* { dg-final { scan-assembler-times {\mvspltis[bhw]\M|\mxxspltib\M} 2 } } */
28 /* { dg-final { scan-assembler-times {\mvsl[bhwd]\M} 2 } } */
29 /* { dg-final { scan-assembler-times {\mlvx\M} 0 } } */