[RS6000] Tests that use int128_t and -m32
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / fold-vec-store-vec_vsx_st-float.c
blobcf13f2a7ec123d14afca19096b0abd085a6b0521
1 /* Verify that overloaded built-ins for vec_vsx_st with float
2 inputs produce the right code. */
4 /* { dg-require-effective-target powerpc_vsx_ok } */
5 /* { dg-options "-mvsx -O2" } */
7 #include <altivec.h>
9 #define BUILD_VAR_TEST(TESTNAME1, VALUE, VAR_OFFSET, SAVETO) \
10 void \
11 TESTNAME1 ## _var (VALUE value, VAR_OFFSET offset, SAVETO * saveto) \
12 { \
13 vec_vsx_st (value, offset, saveto); \
16 #define BUILD_CST_TEST(TESTNAME1, VALUE, CST_OFFSET, SAVETO) \
17 void \
18 TESTNAME1 ## _cst (VALUE value, SAVETO * saveto) \
19 { \
20 vec_vsx_st (value, CST_OFFSET, saveto); \
23 BUILD_VAR_TEST( test1, vector float, signed long long, float );
24 BUILD_VAR_TEST( test2, vector float, signed int, float );
25 BUILD_CST_TEST( test3, vector float, 12, float );
27 BUILD_VAR_TEST( test7, vector float, signed long long, vector float );
28 BUILD_VAR_TEST( test8, vector float, signed int, vector float );
29 BUILD_CST_TEST( test9, vector float, 12, vector float );
31 /* { dg-final { scan-assembler-times {\mstxvd2x\M|\mstxvx\M|\mstvx\M} 6 } } */