]> gcc.gnu.org Git - gcc.git/blame - gcc/testsuite/gcc.dg/pr81192.c
Hybrid EVRP and testcases
[gcc.git] / gcc / testsuite / gcc.dg / pr81192.c
CommitLineData
fcae5121
AM
1/* { dg-options "-Os -fdump-tree-pre-details -fdisable-tree-evrp" } */
2
3/* Disable tree-evrp because the new version of evrp sees
4<bb 3> :
5 if (j_8(D) != 2147483647)
6 goto <bb 4>; [50.00%]
7 else
8 goto <bb 5>; [50.00%]
9<bb 4> :
10 iftmp.2_11 = j_8(D) + 1;
11<bb 5> :
12 # iftmp.2_12 = PHI <j_8(D)(3), iftmp.2_11(4)>
13
14EVRP now recognizes a constant can be propagated into the 3->5 edge and
15produces
16 # iftmp.2_12 = PHI <2147483647(3), iftmp.2_11(4)>
17which causes the situation being tested to dissapear before we get to PRE. */
0bbfd554 18
584d9d58
GJL
19#if __SIZEOF_INT__ == 2
20#define unsigned __UINT32_TYPE__
21#define int __INT32_TYPE__
22#endif
23
0bbfd554
TV
24unsigned a;
25int b, c;
26
27static int
28fn1 (int p1, int p2)
29{
30 return p1 > 2147483647 - p2 ? p1 : p1 + p2;
31}
32
33void
34fn2 (void)
35{
36 int j;
37 a = 30;
38 for (; a;)
39 for (; c; b = fn1 (j, 1))
40 ;
41}
42
be086ff5 43/* { dg-final { scan-tree-dump-times "(?n)find_duplicates: <bb .*> duplicate of <bb .*>" 1 "pre" } } */
This page took 3.325583 seconds and 5 git commands to generate.