1 /* Verify that overloaded built-ins for __builtin_vec_xst with double
2 inputs produce the right code. */
4 /* { dg-require-effective-target powerpc_vsx_ok } */
5 /* { dg-options "-mvsx -O2" } */
9 #define BUILD_VAR_TEST(TESTNAME1, VALUE, VAR_OFFSET, SAVETO) \
11 TESTNAME1 ## _var (VALUE value, VAR_OFFSET offset, SAVETO * saveto) \
13 __builtin_vec_xst (value, offset, saveto); \
16 #define BUILD_CST_TEST(TESTNAME1, VALUE, CST_OFFSET, SAVETO) \
18 TESTNAME1 ## _cst (VALUE value, SAVETO * saveto) \
20 __builtin_vec_xst (value, CST_OFFSET, saveto); \
23 BUILD_VAR_TEST( test1
, vector
double, signed long long, vector
double );
24 BUILD_VAR_TEST( test2
, vector
double, signed int, vector
double );
25 BUILD_CST_TEST( test3
, vector
double, 12, vector
double );
27 BUILD_VAR_TEST( test4
, vector
double, signed long long, double );
28 BUILD_VAR_TEST( test5
, vector
double, signed int, double );
29 BUILD_CST_TEST( test6
, vector
double, 12, double );
31 /* { dg-final { scan-assembler-times {\mstxvd2x\M|\mstxvx\M|\mstvx\M|\mpstxv\M} 6 } } */