3 ; edgefailure - This function illustrates how SCCP is not doing it's job. This
4 ; function should be optimized almost completely away: the loop should be
5 ; analyzed to detect that the body executes exactly once, and thus the branch
6 ; can be eliminated and code becomes trivially dead. This is distilled from a
7 ; real benchmark (mst from Olden benchmark, MakeGraph function). When SCCP is
8 ; fixed, this should be eliminated by a single SCCP application. TODO
16 %i = phi int [ %i2, %bb2 ], [ 0, %bb1 ] ;; Always 0
17 %i2 = add int %i, 1 ;; Always 1
19 %loop = setle int %i2, 0 ;; Always false
20 br bool %loop, label %bb2, label %bb3
28 int "test function"(int %i0, int %j0)
36 %j2 = phi int [%j4, %BB7], [%j1, %BB1]
37 %k2 = phi int [%k4, %BB7], [%k1, %BB1]
38 %kcond = setlt int %k2, 100
39 br bool %kcond, label %BB3, label %BB4
42 %jcond = setlt int %j2, 20
43 br bool %jcond, label %BB5, label %BB6
57 %j4 = phi int [%i1, %BB5], [%k2, %BB6]
58 %k4 = phi int [%k3, %BB5], [%k5, %BB6]