Replace all instances of dg.exp file with lit.local.cfg, since all tests are run...
[oota-llvm.git] / test / Transforms / SCCP / 2006-10-23-IPSCCP-Crash.ll
1 ; RUN: opt < %s -sccp -disable-output
2 ; END.
3 target datalayout = "E-p:32:32"
4 target triple = "powerpc-apple-darwin8.7.0"
5         %struct.pat_list = type { i32, %struct.pat_list* }
6 @JUMP = external global i32             ; <i32*> [#uses=1]
7 @old_D_pat = external global [16 x i8]          ; <[16 x i8]*> [#uses=0]
8
9 define void @asearch1(i32 %D) {
10 entry:
11         %tmp80 = icmp ult i32 0, %D             ; <i1> [#uses=1]
12         br i1 %tmp80, label %bb647.preheader, label %cond_true81.preheader
13 cond_true81.preheader:          ; preds = %entry
14         ret void
15 bb647.preheader:                ; preds = %entry
16         %tmp3.i = call i32 @read( )             ; <i32> [#uses=1]
17         %tmp6.i = add i32 %tmp3.i, 0            ; <i32> [#uses=1]
18         %tmp653 = icmp sgt i32 %tmp6.i, 0               ; <i1> [#uses=1]
19         br i1 %tmp653, label %cond_true654, label %UnifiedReturnBlock
20 cond_true612:           ; preds = %cond_true654
21         ret void
22 cond_next624:           ; preds = %cond_true654
23         ret void
24 cond_true654:           ; preds = %bb647.preheader
25         br i1 undef, label %cond_true612, label %cond_next624
26 UnifiedReturnBlock:             ; preds = %bb647.preheader
27         ret void
28 }
29
30 define void @bitap(i32 %D) {
31 entry:
32         %tmp29 = icmp eq i32 0, 0               ; <i1> [#uses=1]
33         br i1 %tmp29, label %cond_next50, label %cond_next37
34 cond_next37:            ; preds = %entry
35         ret void
36 cond_next50:            ; preds = %entry
37         %tmp52 = icmp sgt i32 %D, 0             ; <i1> [#uses=1]
38         br i1 %tmp52, label %cond_true53, label %cond_next71
39 cond_true53:            ; preds = %cond_next50
40         %tmp54 = load i32* @JUMP                ; <i32> [#uses=1]
41         %tmp55 = icmp eq i32 %tmp54, 1          ; <i1> [#uses=1]
42         br i1 %tmp55, label %cond_true56, label %cond_next63
43 cond_true56:            ; preds = %cond_true53
44         %tmp57 = bitcast i32 %D to i32          ; <i32> [#uses=1]
45         call void @asearch1( i32 %tmp57 )
46         ret void
47 cond_next63:            ; preds = %cond_true53
48         ret void
49 cond_next71:            ; preds = %cond_next50
50         ret void
51 }
52
53 declare i32 @read()
54
55 define void @initial_value() {
56 entry:
57         ret void
58 }
59
60 define void @main() {
61 entry:
62         br label %cond_next252
63 cond_next208:           ; preds = %cond_true260
64         %tmp229 = call i32 @atoi( )             ; <i32> [#uses=1]
65         br label %cond_next252
66 bb217:          ; preds = %cond_true260
67         ret void
68 cond_next252:           ; preds = %cond_next208, %entry
69         %D.0.0 = phi i32 [ 0, %entry ], [ %tmp229, %cond_next208 ]              ; <i32> [#uses=1]
70         %tmp254 = getelementptr i8** null, i32 1                ; <i8**> [#uses=1]
71         %tmp256 = load i8** %tmp254             ; <i8*> [#uses=1]
72         %tmp258 = load i8* %tmp256              ; <i8> [#uses=1]
73         %tmp259 = icmp eq i8 %tmp258, 45                ; <i1> [#uses=1]
74         br i1 %tmp259, label %cond_true260, label %bb263
75 cond_true260:           ; preds = %cond_next252
76         %tmp205818 = icmp sgt i8 0, -1          ; <i1> [#uses=1]
77         br i1 %tmp205818, label %cond_next208, label %bb217
78 bb263:          ; preds = %cond_next252
79         %tmp265 = icmp eq i32 0, 0              ; <i1> [#uses=1]
80         br i1 %tmp265, label %cond_next276, label %cond_true266
81 cond_true266:           ; preds = %bb263
82         ret void
83 cond_next276:           ; preds = %bb263
84         %tmp278 = icmp eq i32 0, 0              ; <i1> [#uses=1]
85         br i1 %tmp278, label %cond_next298, label %cond_true279
86 cond_true279:           ; preds = %cond_next276
87         ret void
88 cond_next298:           ; preds = %cond_next276
89         call void @bitap( i32 %D.0.0 )
90         ret void
91 }
92
93 declare i32 @atoi()
94
95 define void @subset_pset() {
96 entry:
97         ret void
98 }
99
100 define void @strcmp() {
101 entry:
102         ret void
103 }