Use conditional internal functions in if-conversion
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / pr16458-4.c
blob8db43e82384eb78769df03ff73936cad83b577c7
1 /* Test cse'ing of unsigned compares. */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -fno-jump-tables" } */
5 /* The following tests fail due to an issue in expand not
6 attaching an type expression information on *index's reg rtx. */
8 /* { dg-final { scan-assembler-not "cmpwi" } } */
9 /* { dg-final { scan-assembler-times "cmplwi" 5 } } */
11 extern int case0 (void);
12 extern int case1 (void);
13 extern int case2 (void);
14 extern int case3 (void);
15 extern int case4 (void);
17 enum CASE_VALUES
19 CASE0 = 1,
20 CASE1,
21 CASE2,
22 CASE3,
23 CASE4
26 int
27 foo (enum CASE_VALUES *index)
29 switch (*index)
31 case CASE0:
32 return case0 ();
33 case CASE1:
34 return case1 ();
35 case CASE2:
36 return case2 ();
37 case CASE3:
38 return case3 ();
39 case CASE4:
40 return case4 ();
43 return 0;