1; RUN: opt < %s -sccp -disable-output
2; PR1431
3
4define void @_ada_bench() {
5entry:
6	br label %cond_next
7cond_next:		; preds = %cond_next, %entry
8	%indvar46 = phi i32 [ 0, %entry ], [ %indvar.next47, %cond_next ]		; <i32> [#uses=1]
9	%indvar.next47 = add i32 %indvar46, 1		; <i32> [#uses=2]
10	%exitcond48 = icmp eq i32 %indvar.next47, 10000		; <i1> [#uses=1]
11	br i1 %exitcond48, label %cond_next40, label %cond_next
12cond_next40:		; preds = %cond_next40, %cond_next
13	%indvar43 = phi i32 [ %indvar.next44, %cond_next40 ], [ 0, %cond_next ]		; <i32> [#uses=1]
14	%indvar.next44 = add i32 %indvar43, 1		; <i32> [#uses=2]
15	%exitcond45 = icmp eq i32 %indvar.next44, 10000		; <i1> [#uses=1]
16	br i1 %exitcond45, label %cond_next53, label %cond_next40
17cond_next53:		; preds = %cond_next53, %cond_next40
18	%indvar41 = phi i32 [ %indvar.next42, %cond_next53 ], [ 0, %cond_next40 ]		; <i32> [#uses=1]
19	%indvar.next42 = add i32 %indvar41, 1		; <i32> [#uses=2]
20	%exitcond = icmp eq i32 %indvar.next42, 10000		; <i1> [#uses=1]
21	br i1 %exitcond, label %bb67, label %cond_next53
22bb67:		; preds = %cond_next53
23	%tmp112 = invoke double @sin( double 5.000000e-01 )
24			to label %bb114 unwind label %cleanup		; <double> [#uses=0]
25bb114:		; preds = %bb67
26	%tmp147 = invoke double @log( double 5.000000e-01 )
27			to label %bb149 unwind label %cleanup		; <double> [#uses=0]
28bb149:		; preds = %bb114
29	%tmp175 = invoke double @sqrt( double 5.000000e-01 )
30			to label %bb177 unwind label %cleanup		; <double> [#uses=0]
31bb177:		; preds = %bb149
32	unreachable
33cleanup:		; preds = %bb149, %bb114, %bb67
34        %val = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
35                 cleanup
36	resume { i8*, i32 } %val
37}
38
39declare double @sin(double)
40
41declare double @log(double)
42
43declare double @sqrt(double)
44
45declare i32 @__gxx_personality_v0(...)
46