1; RUN: llc -march=hexagon < %s | FileCheck %s
2; CHECK: cmpb.gtu
3
4target triple = "hexagon"
5
6%s.0 = type { void (i8)*, void (i8)*, void (i8)*, void (i8)* }
7%s.1 = type { i8 (i8)*, void (i8)* }
8%s.2 = type { i8 (i8, %s.3*)*, i8 (i8)*, i8 (i8)*, i8 (i8)*, i8 (i8)*, i8 (i8)*, i8 (i16)*, i8 (i8)*, i8 (i16)*, i8 (i8)* }
9%s.3 = type { %s.4, [2 x %s.5], i8, %s.7, %s.19, i8, %s.8, i16, [6 x %s.14], %s.17, %s.18, %s.19 }
10%s.4 = type { i16, i8, i8* }
11%s.5 = type { i16, i8, i8, i8, i8, i8, i8, i8, i16, i8, i8, i8, i16, %s.6 }
12%s.6 = type { i8, i16, i16, i8, i8 }
13%s.7 = type { i8, i8, i8, i8, i64, i64 }
14%s.8 = type { i16, %s.9, i32, %s.10*, i8, i8 }
15%s.9 = type { i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }
16%s.10 = type { i8, [14 x i8], [14 x %s.11*] }
17%s.11 = type { i8, i8, i8, i8, i8, i16, i8, i8, i8, i8, i8, i8, i8, i8, %s.12, %s.13 }
18%s.12 = type { i16, i8, i8, i8, i16, i8, i8 }
19%s.13 = type { i8, i8, i8, i8, i8, i8 }
20%s.14 = type { i16, %s.15 }
21%s.15 = type { i16, i8, i16, i16, i16, i16, [1 x %s.16], i8, i8, i8, i32 }
22%s.16 = type { i8, i16, i16, i8 }
23%s.17 = type { i16, i16, i16, i8, i8 }
24%s.18 = type { i8, i8, i32 }
25%s.19 = type { i8, i8, i8, i8 }
26%s.22 = type { %s.23, %s.24 }
27%s.23 = type { i8, i8, i8, i8, i8, i8, i8, %s.0*, %s.1*, %s.2*, i8 }
28%s.24 = type { i16, i16, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i16, i8, i8 }
29%s.25 = type { %s.26 }
30%s.26 = type { i8, i8, i32 }
31
32@g0 = external global %s.0
33@g1 = external global %s.1
34@g2 = external global %s.2
35@g3 = external global %s.0
36@g4 = external global %s.0
37@g5 = external global %s.0
38@g6 = external global %s.0
39@g7 = external global %s.0
40@g8 = external global %s.1
41@g9 = external global %s.2
42@g10 = external global %s.0
43@g11 = external global %s.0
44@g12 = external global %s.1
45@g13 = external global %s.2
46@g14 = external global %s.0
47@g15 = external global %s.1
48@g16 = external global %s.2
49@g17 = external global %s.0
50@g18 = external global %s.2
51@g19 = common global [6 x %s.22] zeroinitializer, align 8
52@g20 = common global %s.25 zeroinitializer, align 4
53
54declare void @f0()
55
56declare void @f1()
57
58declare void @f2()
59
60declare void @f3()
61
62declare void @f4()
63
64declare void @f5(i8 zeroext)
65
66declare void @f6()
67
68; Function Attrs: nounwind
69define void @f7() #0 {
70b0:
71  %v0 = load i8, i8* getelementptr inbounds (%s.25, %s.25* @g20, i32 0, i32 0, i32 1), align 1, !tbaa !0
72  %v1 = icmp eq i8 %v0, 1
73  br label %b1
74
75b1:                                               ; preds = %b5, %b0
76  %v2 = phi i32 [ 0, %b0 ], [ %v14, %b5 ]
77  %v3 = getelementptr inbounds [6 x %s.22], [6 x %s.22]* @g19, i32 0, i32 %v2, i32 1, i32 4
78  %v4 = load i8, i8* %v3, align 2, !tbaa !0
79  %v5 = icmp eq i8 %v4, 1
80  br i1 %v5, label %b2, label %b5
81
82b2:                                               ; preds = %b1
83  br i1 %v1, label %b3, label %b4
84
85b3:                                               ; preds = %b2
86  %v6 = getelementptr inbounds [6 x %s.22], [6 x %s.22]* @g19, i32 0, i32 %v2, i32 1, i32 6
87  %v7 = load i8, i8* %v6, align 4, !tbaa !0
88  %v8 = add i8 %v7, -2
89  %v9 = icmp ult i8 %v8, 44
90  br i1 %v9, label %b5, label %b4
91
92b4:                                               ; preds = %b3, %b2
93  %v10 = shl i32 1, %v2
94  %v11 = load i32, i32* getelementptr inbounds (%s.25, %s.25* @g20, i32 0, i32 0, i32 2), align 4, !tbaa !3
95  %v12 = or i32 %v11, %v10
96  store i32 %v12, i32* getelementptr inbounds (%s.25, %s.25* @g20, i32 0, i32 0, i32 2), align 4, !tbaa !3
97  %v13 = getelementptr inbounds [6 x %s.22], [6 x %s.22]* @g19, i32 0, i32 %v2, i32 1, i32 13
98  store i8 1, i8* %v13, align 4, !tbaa !0
99  br label %b5
100
101b5:                                               ; preds = %b4, %b3, %b1
102  %v14 = add i32 %v2, 1
103  %v15 = trunc i32 %v14 to i8
104  %v16 = icmp eq i8 %v15, 6
105  br i1 %v16, label %b6, label %b1
106
107b6:                                               ; preds = %b5
108  ret void
109}
110
111declare void @f8(i8 zeroext)
112
113declare void @f9()
114
115declare void @f10()
116
117attributes #0 = { nounwind }
118
119!0 = !{!1, !1, i64 0}
120!1 = !{!"omnipotent char", !2}
121!2 = !{!"Simple C/C++ TBAA"}
122!3 = !{!4, !4, i64 0}
123!4 = !{!"long", !1}
124