Handle T_HRESULT types in CodeView records
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / fold-vec-store-vec_xst-short.c
blobd47fc2aa09bdbb1625bdd303776092278b6bedb7
1 /* Verify that overloaded built-ins for vec_xst with short
2 inputs produce the right code. */
4 /* { dg-options "-mvsx -O2" } */
5 /* { dg-require-effective-target powerpc_vsx } */
7 #include <altivec.h>
8 #define BUILD_VAR_TEST(TESTNAME1, VALUE, VAR_OFFSET, SAVETO) \
9 void \
10 TESTNAME1 ## _var (VALUE value, VAR_OFFSET offset, SAVETO * saveto) \
11 { \
12 vec_xst (value, offset, saveto); \
15 #define BUILD_CST_TEST(TESTNAME1, VALUE, CST_OFFSET, SAVETO) \
16 void \
17 TESTNAME1 ## _cst (VALUE value, SAVETO * saveto) \
18 { \
19 vec_xst (value, CST_OFFSET, saveto); \
22 BUILD_VAR_TEST( test1, vector signed short, signed long long, signed short );
23 BUILD_VAR_TEST( test2, vector signed short, signed int, signed short );
24 BUILD_CST_TEST( test3, vector signed short, 12, signed short );
26 BUILD_VAR_TEST( test4, vector unsigned short, signed long long, unsigned short );
27 BUILD_VAR_TEST( test5, vector unsigned short, signed int, unsigned short );
28 BUILD_CST_TEST( test6, vector unsigned short, 12, unsigned short );
30 BUILD_VAR_TEST( test7, vector signed short, signed long long, vector signed short );
31 BUILD_VAR_TEST( test8, vector signed short, signed int, vector signed short );
32 BUILD_CST_TEST( test9, vector signed short, 12, vector signed short );
34 BUILD_VAR_TEST( test10, vector unsigned short, signed long long, vector unsigned short );
35 BUILD_VAR_TEST( test11, vector unsigned short, signed int, vector unsigned short );
36 BUILD_CST_TEST( test12, vector unsigned short, 12, vector unsigned short );
38 /* { dg-final { scan-assembler-times {\mstxvw4x\M|\mstxvd2x\M|\mstxvx\M|\mstvx\M|\mpstxv\M} 12 } } */