Fortran: fix dependency checks for inquiry refs [PR115039]
[official-gcc.git] / gcc / testsuite / gcc.target / mips / dse-1.c
blobe53189cadd821040f4c56f0b4ed5e2e449c97fda
1 /* { dg-do compile } */
2 /* { dg-options "-mgp64" } */
3 /* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
5 #define TEST(ID, TYPE1, TYPE2) \
6 union u##ID { \
7 TYPE1 m1[sizeof (TYPE2) / sizeof (TYPE1)]; \
8 TYPE2 m2; \
9 }; \
11 /* The MIPS16 versions of the shifts we need are too \
12 expensive. */ \
13 TYPE1 __attribute__((nomips16)) \
14 f##ID (TYPE2 x, union u##ID *u) \
15 { \
16 u->m2 = x; \
17 return (u->m1[0] \
18 + u->m1[sizeof (TYPE2) / sizeof (TYPE1) - 1]); \
19 } \
21 TYPE1 __attribute__((nomips16)) \
22 g##ID (union u##ID *u) \
23 { \
24 u->m2 = 0; \
25 return (u->m1[0] | u->m1[1]); \
28 TEST (1, unsigned int, unsigned long long);
29 TEST (2, int, long long);
30 TEST (3, unsigned short, unsigned long long);
31 TEST (4, short, long long);
32 TEST (5, unsigned char, unsigned long long);
33 TEST (6, signed char, long long);
35 TEST (7, unsigned short, unsigned int);
36 TEST (8, short, int);
37 TEST (9, unsigned char, unsigned int);
38 TEST (10, signed char, int);
40 TEST (11, unsigned char, unsigned short);
41 TEST (12, signed char, short);
43 /* { dg-final { scan-assembler-not "\tlh\t" } } */
44 /* { dg-final { scan-assembler-not "\tlhu\t" } } */
45 /* { dg-final { scan-assembler-not "\tlw\t" } } */
46 /* { dg-final { scan-assembler-not "\tlwu\t" } } */
47 /* { dg-final { scan-assembler-not "\tlb\t" } } */
48 /* { dg-final { scan-assembler-not "\tlbu\t" } } */