1 /* Verify that overloaded built-ins for vec_vsx_ld with int
2 inputs produce the right code. */
4 /* { dg-require-effective-target powerpc_vsx_ok } */
5 /* { dg-options "-mvsx -O2" } */
8 #define BUILD_VAR_TEST(TESTNAME1, RETTYPE, VAR_OFFSET, LOADFROM) \
10 TESTNAME1 ## _var (VAR_OFFSET offset, LOADFROM * loadfrom) \
12 return vec_vsx_ld (offset, loadfrom); \
15 #define BUILD_CST_TEST(TESTNAME1, RETTYPE, CST_OFFSET, LOADFROM) \
17 TESTNAME1 ## _cst (LOADFROM * loadfrom) \
19 return vec_vsx_ld (CST_OFFSET, loadfrom); \
22 BUILD_VAR_TEST( test1
, vector
signed int, signed long long, signed int);
23 BUILD_VAR_TEST( test2
, vector
signed int, signed int, signed int);
24 BUILD_CST_TEST( test3
, vector
signed int, 12, signed int);
26 BUILD_VAR_TEST( test4
, vector
unsigned int, signed long long, unsigned int);
27 BUILD_VAR_TEST( test5
, vector
unsigned int, signed int, unsigned int);
28 BUILD_CST_TEST( test6
, vector
unsigned int, 12, unsigned int);
30 BUILD_VAR_TEST( test7
, vector
signed int, signed long long, vector
signed int);
31 BUILD_VAR_TEST( test8
, vector
signed int, signed int, vector
signed int);
32 BUILD_CST_TEST( test9
, vector
signed int, 12, vector
signed int);
34 BUILD_VAR_TEST( test10
, vector
unsigned int, signed long long, vector
unsigned int);
35 BUILD_VAR_TEST( test11
, vector
unsigned int, signed int, vector
unsigned int);
36 BUILD_CST_TEST( test12
, vector
unsigned int, 12, vector
unsigned int);
38 /* { dg-final { scan-assembler-times {\mlxvw4x\M|\mlxvd2x\M|\mlxvx\M|\mlvx\M|\mplxv\M} 12 } } */