blob: 54f4b2ef689336425f3e20cc2c3c643e1202037c [file] [log] [blame]
Evan Cheng39aa7252009-11-16 06:31:49 +00001; RUN: llc < %s -mtriple=powerpc-apple-darwin8
2
3%struct.FILE = type { i8*, i32, i32, i16, i16, %struct.__sbuf, i32, i8*, i32 (i8*)*, i32 (i8*, i8*, i32)*, i64 (i8*, i64, i32)*, i32 (i8*, i8*, i32)*, %struct.__sbuf, %struct.__sFILEX*, i32, [3 x i8], [1 x i8], %struct.__sbuf, i32, i64 }
4%struct.__gcov_var = type { %struct.FILE*, i32, i32, i32, i32, i32, i32, [1025 x i32] }
5%struct.__sFILEX = type opaque
6%struct.__sbuf = type { i8*, i32 }
7%struct.gcov_ctr_info = type { i32, i64*, void (i64*, i32)* }
8%struct.gcov_ctr_summary = type { i32, i32, i64, i64, i64 }
9%struct.gcov_fn_info = type { i32, i32, [0 x i32] }
10%struct.gcov_info = type { i32, %struct.gcov_info*, i32, i8*, i32, %struct.gcov_fn_info*, i32, [0 x %struct.gcov_ctr_info] }
11%struct.gcov_summary = type { i32, [1 x %struct.gcov_ctr_summary] }
12
13@__gcov_var = external global %struct.__gcov_var ; <%struct.__gcov_var*> [#uses=1]
14@__sF = external global [0 x %struct.FILE] ; <[0 x %struct.FILE]*> [#uses=1]
15@.str = external constant [56 x i8], align 4 ; <[56 x i8]*> [#uses=1]
16@gcov_list = external global %struct.gcov_info* ; <%struct.gcov_info**> [#uses=1]
17@.str7 = external constant [35 x i8], align 4 ; <[35 x i8]*> [#uses=1]
18@.str8 = external constant [9 x i8], align 4 ; <[9 x i8]*> [#uses=1]
19@.str9 = external constant [10 x i8], align 4 ; <[10 x i8]*> [#uses=1]
20@.str10 = external constant [36 x i8], align 4 ; <[36 x i8]*> [#uses=1]
21
22declare i32 @"\01_fprintf$LDBL128"(%struct.FILE*, i8*, ...) nounwind
23
24define void @gcov_exit() nounwind {
25entry:
26 %gi_ptr.0357 = load %struct.gcov_info** @gcov_list, align 4 ; <%struct.gcov_info*> [#uses=1]
27 %0 = alloca i8, i32 undef, align 1 ; <i8*> [#uses=3]
28 br i1 undef, label %return, label %bb.nph341
29
30bb.nph341: ; preds = %entry
31 %object27 = bitcast %struct.gcov_summary* undef to i8* ; <i8*> [#uses=1]
32 br label %bb25
33
34bb25: ; preds = %read_fatal, %bb.nph341
35 %gi_ptr.1329 = phi %struct.gcov_info* [ %gi_ptr.0357, %bb.nph341 ], [ undef, %read_fatal ] ; <%struct.gcov_info*> [#uses=1]
36 call void @llvm.memset.i32(i8* %object27, i8 0, i32 36, i32 8)
37 br i1 undef, label %bb49.1, label %bb48
38
39bb48: ; preds = %bb25
40 br label %bb49.1
41
42bb51: ; preds = %bb48.4, %bb49.3
43 switch i32 undef, label %bb58 [
44 i32 0, label %rewrite
45 i32 1734567009, label %bb59
46 ]
47
48bb58: ; preds = %bb51
49 %1 = call i32 (%struct.FILE*, i8*, ...)* @"\01_fprintf$LDBL128"(%struct.FILE* getelementptr inbounds ([0 x %struct.FILE]* @__sF, i32 0, i32 2), i8* getelementptr inbounds ([35 x i8]* @.str7, i32 0, i32 0), i8* %0) nounwind ; <i32> [#uses=0]
50 br label %read_fatal
51
52bb59: ; preds = %bb51
53 br i1 undef, label %bb60, label %bb3.i156
54
55bb3.i156: ; preds = %bb59
56 store i8 52, i8* undef, align 1
57 store i8 42, i8* undef, align 1
58 %2 = call i32 (%struct.FILE*, i8*, ...)* @"\01_fprintf$LDBL128"(%struct.FILE* getelementptr inbounds ([0 x %struct.FILE]* @__sF, i32 0, i32 2), i8* getelementptr inbounds ([56 x i8]* @.str, i32 0, i32 0), i8* %0, i8* undef, i8* undef) nounwind ; <i32> [#uses=0]
59 br label %read_fatal
60
61bb60: ; preds = %bb59
62 br i1 undef, label %bb78.preheader, label %rewrite
63
64bb78.preheader: ; preds = %bb60
65 br i1 undef, label %bb62, label %bb80
66
67bb62: ; preds = %bb78.preheader
68 br i1 undef, label %bb64, label %read_mismatch
69
70bb64: ; preds = %bb62
71 br i1 undef, label %bb65, label %read_mismatch
72
73bb65: ; preds = %bb64
74 br i1 undef, label %bb75, label %read_mismatch
75
76read_mismatch: ; preds = %bb98, %bb119.preheader, %bb72, %bb71, %bb65, %bb64, %bb62
77 %3 = icmp eq i32 undef, -1 ; <i1> [#uses=1]
78 %iftmp.11.0 = select i1 %3, i8* getelementptr inbounds ([10 x i8]* @.str9, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8]* @.str8, i32 0, i32 0) ; <i8*> [#uses=1]
79 %4 = call i32 (%struct.FILE*, i8*, ...)* @"\01_fprintf$LDBL128"(%struct.FILE* getelementptr inbounds ([0 x %struct.FILE]* @__sF, i32 0, i32 2), i8* getelementptr inbounds ([36 x i8]* @.str10, i32 0, i32 0), i8* %0, i8* %iftmp.11.0) nounwind ; <i32> [#uses=0]
80 br label %read_fatal
81
82bb71: ; preds = %bb75
83 %5 = load i32* undef, align 4 ; <i32> [#uses=1]
84 %6 = getelementptr inbounds %struct.gcov_info* %gi_ptr.1329, i32 0, i32 7, i32 undef, i32 2 ; <void (i64*, i32)**> [#uses=1]
85 %7 = load void (i64*, i32)** %6, align 4 ; <void (i64*, i32)*> [#uses=1]
86 %8 = call i32 @__gcov_read_unsigned() nounwind ; <i32> [#uses=1]
87 %9 = call i32 @__gcov_read_unsigned() nounwind ; <i32> [#uses=1]
88 %10 = icmp eq i32 %tmp386, %8 ; <i1> [#uses=1]
89 br i1 %10, label %bb72, label %read_mismatch
90
91bb72: ; preds = %bb71
92 %11 = icmp eq i32 undef, %9 ; <i1> [#uses=1]
93 br i1 %11, label %bb73, label %read_mismatch
94
95bb73: ; preds = %bb72
96 call void %7(i64* null, i32 %5) nounwind
97 unreachable
98
99bb74: ; preds = %bb75
100 %12 = add i32 %13, 1 ; <i32> [#uses=1]
101 br label %bb75
102
103bb75: ; preds = %bb74, %bb65
104 %13 = phi i32 [ %12, %bb74 ], [ 0, %bb65 ] ; <i32> [#uses=2]
105 %tmp386 = add i32 0, 27328512 ; <i32> [#uses=1]
106 %14 = shl i32 1, %13 ; <i32> [#uses=1]
107 %15 = load i32* undef, align 4 ; <i32> [#uses=1]
108 %16 = and i32 %15, %14 ; <i32> [#uses=1]
109 %17 = icmp eq i32 %16, 0 ; <i1> [#uses=1]
110 br i1 %17, label %bb74, label %bb71
111
112bb80: ; preds = %bb78.preheader
113 unreachable
114
115read_fatal: ; preds = %read_mismatch, %bb3.i156, %bb58
116 br i1 undef, label %return, label %bb25
117
118rewrite: ; preds = %bb60, %bb51
119 store i32 -1, i32* getelementptr inbounds (%struct.__gcov_var* @__gcov_var, i32 0, i32 6), align 4
120 br i1 undef, label %bb94, label %bb119.preheader
121
122bb94: ; preds = %rewrite
123 unreachable
124
125bb119.preheader: ; preds = %rewrite
126 br i1 undef, label %read_mismatch, label %bb98
127
128bb98: ; preds = %bb119.preheader
129 br label %read_mismatch
130
131return: ; preds = %read_fatal, %entry
132 ret void
133
134bb49.1: ; preds = %bb48, %bb25
135 br i1 undef, label %bb49.2, label %bb48.2
136
137bb49.2: ; preds = %bb48.2, %bb49.1
138 br i1 undef, label %bb49.3, label %bb48.3
139
140bb48.2: ; preds = %bb49.1
141 br label %bb49.2
142
143bb49.3: ; preds = %bb48.3, %bb49.2
144 br i1 undef, label %bb51, label %bb48.4
145
146bb48.3: ; preds = %bb49.2
147 br label %bb49.3
148
149bb48.4: ; preds = %bb49.3
150 br label %bb51
151}
152
153declare i32 @__gcov_read_unsigned() nounwind
154
155declare void @llvm.memset.i32(i8* nocapture, i8, i32, i32) nounwind