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(ptr, ptr)
84 ; Function Attrs: nounwind
85 define i32 @f1(i32 %a0, ptr %a1) #0 {
87 %v01 = alloca i32, align 4
88 %v12 = alloca i32, align 4
89 %v23 = alloca ptr, align 4
90 %v34 = alloca i32, align 4
92 store i32 %a0, ptr %v12, align 4
93 store ptr %a1, ptr %v23, align 4
94 %v45 = load ptr, ptr %v23, align 4
95 %v56 = getelementptr inbounds ptr, ptr %v45, i32 1
96 %v67 = load ptr, ptr %v56, align 4
97 %v78 = call i32 @f2(ptr %v67)
98 store i32 %v78, ptr %v34, align 4
99 %v89 = load i32, ptr %v34, align 4
100 switch i32 %v89, label %b11 [
114 %v11 = call i32 @f0(ptr @g0, ptr @g1)
117 b2: ; preds = %b1, %b0
118 %v1211 = getelementptr inbounds [10 x [10 x i8]], ptr @g1, i32 0, i32 1
119 %v14 = call i32 @f0(ptr @g0, ptr %v1211)
122 b3: ; preds = %b2, %b0
123 %v15 = getelementptr inbounds [10 x [10 x i8]], ptr @g1, i32 0, i32 2
124 %v17 = call i32 @f0(ptr @g0, ptr %v15)
127 b4: ; preds = %b3, %b0
128 %v18 = getelementptr inbounds [10 x [10 x i8]], ptr @g1, i32 0, i32 3
129 %v20 = call i32 @f0(ptr @g0, ptr %v18)
132 b5: ; preds = %b4, %b0
133 %v21 = getelementptr inbounds [10 x [10 x i8]], ptr @g1, i32 0, i32 4
134 %v2312 = call i32 @f0(ptr @g0, ptr %v21)
137 b6: ; preds = %b5, %b0
138 %v24 = getelementptr inbounds [10 x [10 x i8]], ptr @g1, i32 0, i32 5
139 %v26 = call i32 @f0(ptr @g0, ptr %v24)
142 b7: ; preds = %b6, %b0
143 %v27 = getelementptr inbounds [10 x [10 x i8]], ptr @g1, i32 0, i32 6
144 %v29 = call i32 @f0(ptr @g0, ptr %v27)
147 b8: ; preds = %b7, %b0
148 %v30 = getelementptr inbounds [10 x [10 x i8]], ptr @g1, i32 0, i32 7
149 %v32 = call i32 @f0(ptr @g0, ptr %v30)
152 b9: ; preds = %b8, %b0
153 %v33 = getelementptr inbounds [10 x [10 x i8]], ptr @g1, i32 0, i32 8
154 %v35 = call i32 @f0(ptr @g0, ptr %v33)
157 b10: ; preds = %b9, %b0
158 %v36 = getelementptr inbounds [10 x [10 x i8]], ptr @g1, i32 0, i32 9
159 %v38 = call i32 @f0(ptr @g0, ptr %v36)
162 b11: ; preds = %b10, %b0
166 ; Function Attrs: nounwind
167 declare i32 @f2(ptr) #0
169 attributes #0 = { nounwind }