opt-glob-addrs-000.ll
6.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
; RUN: llc -march=hexagon -O2 -disable-hexagon-misched < %s | FileCheck %s
target triple = "hexagon-unknown--elf"
; CHECK-LABEL: f1:
; CHECK-DAG: r16 = ##.Lg0+32767
; CHECK-DAG: r17 = ##g1+32767
; CHECK-LABEL: LBB0_2:
; CHECK: {
; CHECK-DAG: call f0
; CHECK-DAG: r0 = add(r16,#-32767)
; CHECK-DAG: r1 = add(r17,#-32767)
; CHECK: }
; CHECK-LABEL: LBB0_3:
; CHECK: {
; CHECK-DAG: call f0
; CHECK-DAG: r0 = add(r16,#-32767)
; CHECK-DAG: r1 = add(r17,#-32757)
; CHECK: }
; CHECK-LABEL: LBB0_4:
; CHECK: {
; CHECK-DAG: call f0
; CHECK-DAG: r0 = add(r16,#-32767)
; CHECK-DAG: r1 = add(r17,#-32747)
; CHECK: }
; CHECK-LABEL: LBB0_5:
; CHECK: {
; CHECK-DAG: call f0
; CHECK-DAG: r0 = add(r16,#-32767)
; CHECK-DAG: r1 = add(r17,#-32737)
; CHECK: }
; CHECK-LABEL: LBB0_6:
; CHECK: {
; CHECK-DAG: call f0
; CHECK-DAG: r0 = add(r16,#-32767)
; CHECK-DAG: r1 = add(r17,#-32727)
; CHECK: }
; CHECK-LABEL: LBB0_7:
; CHECK: {
; CHECK-DAG: call f0
; CHECK-DAG: r0 = add(r16,#-32767)
; CHECK-DAG: r1 = add(r17,#-32717)
; CHECK: }
; CHECK-LABEL: LBB0_8:
; CHECK: {
; CHECK-DAG: call f0
; CHECK-DAG: r0 = add(r16,#-32767)
; CHECK-DAG: r1 = add(r17,#-32707)
; CHECK: }
; CHECK-LABEL: LBB0_9:
; CHECK: {
; CHECK-DAG: call f0
; CHECK-DAG: r0 = add(r16,#-32767)
; CHECK-DAG: r1 = add(r17,#-32697)
; CHECK: }
; CHECK-LABEL: LBB0_10:
; CHECK: {
; CHECK-DAG: call f0
; CHECK-DAG: r0 = add(r16,#-32767)
; CHECK-DAG: r1 = add(r17,#-32687)
; CHECK: }
; CHECK-LABEL: LBB0_11:
; CHECK: {
; CHECK-DAG: call f0
; CHECK-DAG: r0 = add(r16,#-32767)
; CHECK-DAG: r1 = add(r17,#-32677)
; CHECK: }
@g0 = private unnamed_addr constant [4 x i8] c"%s\0A\00", align 1
@g1 = internal constant [10 x [10 x i8]] [[10 x i8] c"[0000]\00\00\00\00", [10 x i8] c"[0001]\00\00\00\00", [10 x i8] c"[0002]\00\00\00\00", [10 x i8] c"[0003]\00\00\00\00", [10 x i8] c"[0004]\00\00\00\00", [10 x i8] c"[0005]\00\00\00\00", [10 x i8] c"[0006]\00\00\00\00", [10 x i8] c"[0007]\00\00\00\00", [10 x i8] c"[0008]\00\00\00\00", [10 x i8] c"[0009]\00\00\00\00"], align 16
declare i32 @f0(i8*, i8*)
; Function Attrs: nounwind
define i32 @f1(i32 %a0, i8** %a1) #0 {
b0:
%v01 = alloca i32, align 4
%v12 = alloca i32, align 4
%v23 = alloca i8**, align 4
%v34 = alloca i32, align 4
store i32 0, i32* %v01
store i32 %a0, i32* %v12, align 4
store i8** %a1, i8*** %v23, align 4
%v45 = load i8**, i8*** %v23, align 4
%v56 = getelementptr inbounds i8*, i8** %v45, i32 1
%v67 = load i8*, i8** %v56, align 4
%v78 = call i32 @f2(i8* %v67)
store i32 %v78, i32* %v34, align 4
%v89 = load i32, i32* %v34, align 4
switch i32 %v89, label %b11 [
i32 0, label %b1
i32 1, label %b2
i32 2, label %b3
i32 3, label %b4
i32 4, label %b5
i32 5, label %b6
i32 6, label %b7
i32 7, label %b8
i32 8, label %b9
i32 9, label %b10
]
b1: ; preds = %b0
%v910 = getelementptr inbounds [10 x [10 x i8]], [10 x [10 x i8]]* @g1, i32 0, i32 0
%v10 = getelementptr inbounds [10 x i8], [10 x i8]* %v910, i32 0, i32 0
%v11 = call i32 @f0(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @g0, i32 0, i32 0), i8* %v10)
br label %b2
b2: ; preds = %b1, %b0
%v1211 = getelementptr inbounds [10 x [10 x i8]], [10 x [10 x i8]]* @g1, i32 0, i32 1
%v13 = getelementptr inbounds [10 x i8], [10 x i8]* %v1211, i32 0, i32 0
%v14 = call i32 @f0(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @g0, i32 0, i32 0), i8* %v13)
br label %b3
b3: ; preds = %b2, %b0
%v15 = getelementptr inbounds [10 x [10 x i8]], [10 x [10 x i8]]* @g1, i32 0, i32 2
%v16 = getelementptr inbounds [10 x i8], [10 x i8]* %v15, i32 0, i32 0
%v17 = call i32 @f0(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @g0, i32 0, i32 0), i8* %v16)
br label %b4
b4: ; preds = %b3, %b0
%v18 = getelementptr inbounds [10 x [10 x i8]], [10 x [10 x i8]]* @g1, i32 0, i32 3
%v19 = getelementptr inbounds [10 x i8], [10 x i8]* %v18, i32 0, i32 0
%v20 = call i32 @f0(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @g0, i32 0, i32 0), i8* %v19)
br label %b5
b5: ; preds = %b4, %b0
%v21 = getelementptr inbounds [10 x [10 x i8]], [10 x [10 x i8]]* @g1, i32 0, i32 4
%v22 = getelementptr inbounds [10 x i8], [10 x i8]* %v21, i32 0, i32 0
%v2312 = call i32 @f0(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @g0, i32 0, i32 0), i8* %v22)
br label %b6
b6: ; preds = %b5, %b0
%v24 = getelementptr inbounds [10 x [10 x i8]], [10 x [10 x i8]]* @g1, i32 0, i32 5
%v25 = getelementptr inbounds [10 x i8], [10 x i8]* %v24, i32 0, i32 0
%v26 = call i32 @f0(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @g0, i32 0, i32 0), i8* %v25)
br label %b7
b7: ; preds = %b6, %b0
%v27 = getelementptr inbounds [10 x [10 x i8]], [10 x [10 x i8]]* @g1, i32 0, i32 6
%v28 = getelementptr inbounds [10 x i8], [10 x i8]* %v27, i32 0, i32 0
%v29 = call i32 @f0(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @g0, i32 0, i32 0), i8* %v28)
br label %b8
b8: ; preds = %b7, %b0
%v30 = getelementptr inbounds [10 x [10 x i8]], [10 x [10 x i8]]* @g1, i32 0, i32 7
%v31 = getelementptr inbounds [10 x i8], [10 x i8]* %v30, i32 0, i32 0
%v32 = call i32 @f0(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @g0, i32 0, i32 0), i8* %v31)
br label %b9
b9: ; preds = %b8, %b0
%v33 = getelementptr inbounds [10 x [10 x i8]], [10 x [10 x i8]]* @g1, i32 0, i32 8
%v3413 = getelementptr inbounds [10 x i8], [10 x i8]* %v33, i32 0, i32 0
%v35 = call i32 @f0(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @g0, i32 0, i32 0), i8* %v3413)
br label %b10
b10: ; preds = %b9, %b0
%v36 = getelementptr inbounds [10 x [10 x i8]], [10 x [10 x i8]]* @g1, i32 0, i32 9
%v37 = getelementptr inbounds [10 x i8], [10 x i8]* %v36, i32 0, i32 0
%v38 = call i32 @f0(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @g0, i32 0, i32 0), i8* %v37)
br label %b11
b11: ; preds = %b10, %b0
ret i32 0
}
; Function Attrs: nounwind
declare i32 @f2(i8*) #0
attributes #0 = { nounwind }