Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/gcc.dg/pr24574.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children | 84e7813d76e9 |
comparison
equal
deleted
inserted
replaced
68:561a7518be6b | 111:04ced10e8804 |
---|---|
1 /* { dg-do compile } */ | |
2 /* { dg-options "-O -fdump-tree-phiopt1" } */ | |
3 | |
4 int f0(int i) | |
5 { | |
6 if (i == 0) return 0; | |
7 return i/10; | |
8 } | |
9 int f1(int i) | |
10 { | |
11 return i?i/10:0; | |
12 } | |
13 | |
14 int f2(int i) | |
15 { | |
16 if (i == 0) return 0; | |
17 return i%10; | |
18 } | |
19 int f3(int i) | |
20 { | |
21 return i?i%10:0; | |
22 } | |
23 | |
24 int f4(int i) | |
25 { | |
26 if (i == 0) return 0; | |
27 return i<<10; | |
28 } | |
29 int f5(int i) | |
30 { | |
31 return i?i<<10:0; | |
32 } | |
33 | |
34 /* We should if-convert all functions to carry out the operation | |
35 unconditionally. */ | |
36 /* { dg-final { scan-tree-dump-not "= PHI" "phiopt1" } } */ |