Use conditional internal functions in if-conversion
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / fold-vec-load-vec_xl-longlong.c
blob6df3c79fd1b1c3f703e13abb478271fd889c1294
1 /* Verify that overloaded built-ins for vec_xl with long long
2 inputs produce the right code. */
4 /* { dg-require-effective-target powerpc_vsx_ok } */
5 /* { dg-options "-mvsx -O2" } */
7 #include <altivec.h>
8 #define BUILD_VAR_TEST(TESTNAME1, RETTYPE, VAR_OFFSET, LOADFROM) \
9 RETTYPE \
10 TESTNAME1 ## _var (VAR_OFFSET offset, LOADFROM * loadfrom) \
11 { \
12 return vec_xl (offset, loadfrom); \
15 #define BUILD_CST_TEST(TESTNAME1, RETTYPE, CST_OFFSET, LOADFROM) \
16 RETTYPE \
17 TESTNAME1 ## _cst (LOADFROM * loadfrom) \
18 { \
19 return vec_xl (CST_OFFSET, loadfrom); \
22 BUILD_VAR_TEST( test1, vector long long, signed long long, long long);
23 BUILD_VAR_TEST( test2, vector long long, signed int, long long);
24 BUILD_CST_TEST( test3, vector long long, 12, long long);
26 BUILD_VAR_TEST( test4, vector long long, signed long long, vector long long);
27 BUILD_VAR_TEST( test5, vector long long, signed int, vector long long);
28 BUILD_CST_TEST( test6, vector long long, 12, vector long long);
30 BUILD_VAR_TEST( test7, vector unsigned long long, signed long long, unsigned long long);
31 BUILD_VAR_TEST( test8, vector unsigned long long, signed int, unsigned long long);
32 BUILD_CST_TEST( test9, vector unsigned long long, 12, unsigned long long);
34 BUILD_VAR_TEST( test10, vector unsigned long long, signed long long, vector unsigned long long);
35 BUILD_VAR_TEST( test11, vector unsigned long long, signed int, vector unsigned long long);
36 BUILD_CST_TEST( test12, vector unsigned long long, 12, vector unsigned long long);
38 /* { dg-final { scan-assembler-times {\mlxvd2x\M|\mlxvx\M|\mlvx\M} 12 } } */