1 /* Verify that overloaded built-ins for vec_sl with long long
2 inputs produce the right results. */
4 /* { dg-do compile } */
5 /* { dg-options "-mvsx -O2" } */
6 /* { dg-additional-options "-mdejagnu-cpu=power8" { target { ! has_arch_pwr8 } } } */
7 /* { dg-require-effective-target powerpc_vsx } */
11 vector
signed long long
12 testsl_signed (vector
signed long long x
, vector
unsigned long long y
)
17 vector
unsigned long long
18 testsl_unsigned (vector
unsigned long long x
, vector
unsigned long long y
)
23 vector
signed long long
24 testsr_signed (vector
signed long long x
, vector
unsigned long long y
)
29 vector
unsigned long long
30 testsr_unsigned (vector
unsigned long long x
, vector
unsigned long long y
)
35 vector
signed long long
36 testsra_signed (vector
signed long long x
, vector
unsigned long long y
)
38 return vec_sra (x
, y
);
41 /* watch for PR 79544 here (vsrd / vsrad issue) */
42 vector
unsigned long long
43 testsra_unsigned (vector
unsigned long long x
, vector
unsigned long long y
)
45 return vec_sra (x
, y
);
48 vector
signed long long
49 testrl_signed (vector
signed long long x
, vector
unsigned long long y
)
54 vector
unsigned long long
55 testrl_unsigned (vector
unsigned long long x
, vector
unsigned long long y
)
60 /* { dg-final { scan-assembler-times "vsld" 2 } } */
61 /* { dg-final { scan-assembler-times "vsrd" 2 } } */
62 /* { dg-final { scan-assembler-times "vsrad" 2 } } */
63 /* { dg-final { scan-assembler-times "vrld" 2 } } */