1 ; RUN: llc -march=hexagon -O2 -disable-hexagon-misched < %s | FileCheck %s
3 target triple = "hexagon-unknown--elf"
6 ; CHECK-DAG: r16 = ##.Lg0+32767
7 ; CHECK-DAG: r17 = ##g1+32767
12 ; CHECK-DAG: r0 = add(r16,#-32767)
13 ; CHECK-DAG: r1 = add(r17,#-32767)
16 ; CHECK-LABEL: LBB0_3:
19 ; CHECK-DAG: r0 = add(r16,#-32767)
20 ; CHECK-DAG: r1 = add(r17,#-32757)
23 ; CHECK-LABEL: LBB0_4:
26 ; CHECK-DAG: r0 = add(r16,#-32767)
27 ; CHECK-DAG: r1 = add(r17,#-32747)
30 ; CHECK-LABEL: LBB0_5:
33 ; CHECK-DAG: r0 = add(r16,#-32767)
34 ; CHECK-DAG: r1 = add(r17,#-32737)
37 ; CHECK-LABEL: LBB0_6:
40 ; CHECK-DAG: r0 = add(r16,#-32767)
41 ; CHECK-DAG: r1 = add(r17,#-32727)
44 ; CHECK-LABEL: LBB0_7:
47 ; CHECK-DAG: r0 = add(r16,#-32767)
48 ; CHECK-DAG: r1 = add(r17,#-32717)
51 ; CHECK-LABEL: LBB0_8:
54 ; CHECK-DAG: r0 = add(r16,#-32767)
55 ; CHECK-DAG: r1 = add(r17,#-32707)
58 ; CHECK-LABEL: LBB0_9:
61 ; CHECK-DAG: r0 = add(r16,#-32767)
62 ; CHECK-DAG: r1 = add(r17,#-32697)
65 ; CHECK-LABEL: LBB0_10:
68 ; CHECK-DAG: r0 = add(r16,#-32767)
69 ; CHECK-DAG: r1 = add(r17,#-32687)
72 ; CHECK-LABEL: LBB0_11:
75 ; CHECK-DAG: r0 = add(r16,#-32767)
76 ; CHECK-DAG: r1 = add(r17,#-32677)
79 @g0 = private unnamed_addr constant [4 x i8] c"%s\0A\00", align 1
80 @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
82 declare i32 @f0(i8*, i8*)
84 ; Function Attrs: nounwind
85 define i32 @f1(i32 %a0, i8** %a1) #0 {
87 %v01 = alloca i32, align 4
88 %v12 = alloca i32, align 4
89 %v23 = alloca i8**, align 4
90 %v34 = alloca i32, align 4
91 store i32 0, i32* %v01
92 store i32 %a0, i32* %v12, align 4
93 store i8** %a1, i8*** %v23, align 4
94 %v45 = load i8**, i8*** %v23, align 4
95 %v56 = getelementptr inbounds i8*, i8** %v45, i32 1
96 %v67 = load i8*, i8** %v56, align 4
97 %v78 = call i32 @f2(i8* %v67)
98 store i32 %v78, i32* %v34, align 4
99 %v89 = load i32, i32* %v34, align 4
100 switch i32 %v89, label %b11 [
114 %v910 = getelementptr inbounds [10 x [10 x i8]], [10 x [10 x i8]]* @g1, i32 0, i32 0
115 %v10 = getelementptr inbounds [10 x i8], [10 x i8]* %v910, i32 0, i32 0
116 %v11 = call i32 @f0(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @g0, i32 0, i32 0), i8* %v10)
119 b2: ; preds = %b1, %b0
120 %v1211 = getelementptr inbounds [10 x [10 x i8]], [10 x [10 x i8]]* @g1, i32 0, i32 1
121 %v13 = getelementptr inbounds [10 x i8], [10 x i8]* %v1211, i32 0, i32 0
122 %v14 = call i32 @f0(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @g0, i32 0, i32 0), i8* %v13)
125 b3: ; preds = %b2, %b0
126 %v15 = getelementptr inbounds [10 x [10 x i8]], [10 x [10 x i8]]* @g1, i32 0, i32 2
127 %v16 = getelementptr inbounds [10 x i8], [10 x i8]* %v15, i32 0, i32 0
128 %v17 = call i32 @f0(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @g0, i32 0, i32 0), i8* %v16)
131 b4: ; preds = %b3, %b0
132 %v18 = getelementptr inbounds [10 x [10 x i8]], [10 x [10 x i8]]* @g1, i32 0, i32 3
133 %v19 = getelementptr inbounds [10 x i8], [10 x i8]* %v18, i32 0, i32 0
134 %v20 = call i32 @f0(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @g0, i32 0, i32 0), i8* %v19)
137 b5: ; preds = %b4, %b0
138 %v21 = getelementptr inbounds [10 x [10 x i8]], [10 x [10 x i8]]* @g1, i32 0, i32 4
139 %v22 = getelementptr inbounds [10 x i8], [10 x i8]* %v21, i32 0, i32 0
140 %v2312 = call i32 @f0(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @g0, i32 0, i32 0), i8* %v22)
143 b6: ; preds = %b5, %b0
144 %v24 = getelementptr inbounds [10 x [10 x i8]], [10 x [10 x i8]]* @g1, i32 0, i32 5
145 %v25 = getelementptr inbounds [10 x i8], [10 x i8]* %v24, i32 0, i32 0
146 %v26 = call i32 @f0(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @g0, i32 0, i32 0), i8* %v25)
149 b7: ; preds = %b6, %b0
150 %v27 = getelementptr inbounds [10 x [10 x i8]], [10 x [10 x i8]]* @g1, i32 0, i32 6
151 %v28 = getelementptr inbounds [10 x i8], [10 x i8]* %v27, i32 0, i32 0
152 %v29 = call i32 @f0(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @g0, i32 0, i32 0), i8* %v28)
155 b8: ; preds = %b7, %b0
156 %v30 = getelementptr inbounds [10 x [10 x i8]], [10 x [10 x i8]]* @g1, i32 0, i32 7
157 %v31 = getelementptr inbounds [10 x i8], [10 x i8]* %v30, i32 0, i32 0
158 %v32 = call i32 @f0(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @g0, i32 0, i32 0), i8* %v31)
161 b9: ; preds = %b8, %b0
162 %v33 = getelementptr inbounds [10 x [10 x i8]], [10 x [10 x i8]]* @g1, i32 0, i32 8
163 %v3413 = getelementptr inbounds [10 x i8], [10 x i8]* %v33, i32 0, i32 0
164 %v35 = call i32 @f0(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @g0, i32 0, i32 0), i8* %v3413)
167 b10: ; preds = %b9, %b0
168 %v36 = getelementptr inbounds [10 x [10 x i8]], [10 x [10 x i8]]* @g1, i32 0, i32 9
169 %v37 = getelementptr inbounds [10 x i8], [10 x i8]* %v36, i32 0, i32 0
170 %v38 = call i32 @f0(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @g0, i32 0, i32 0), i8* %v37)
173 b11: ; preds = %b10, %b0
177 ; Function Attrs: nounwind
178 declare i32 @f2(i8*) #0
180 attributes #0 = { nounwind }