• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc -march=hexagon < %s
2; REQUIRES: asserts
3
4%s.0 = type { i8, i8, i8*, i8, i32, %s.0*, %s.0* }
5%s.1 = type { %s.1*, %s.2, %s.0*, %s.2 }
6%s.2 = type { i8, %s.3, i8 }
7%s.3 = type { %s.4* }
8%s.4 = type { [65 x i8], i16, %s.4*, %s.4* }
9
10@g0 = private unnamed_addr constant [4 x i8] c"and\00", align 1
11@g1 = private unnamed_addr constant [3 x i8] c"or\00", align 1
12@g2 = private unnamed_addr constant [8 x i8] c"implies\00", align 1
13@g3 = private unnamed_addr constant [3 x i8] c"if\00", align 1
14@g4 = global [4 x %s.0] [%s.0 { i8 1, i8 38, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @g0, i32 0, i32 0), i8 1, i32 8, %s.0* null, %s.0* null }, %s.0 { i8 2, i8 124, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @g1, i32 0, i32 0), i8 1, i32 7, %s.0* null, %s.0* null }, %s.0 { i8 3, i8 62, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @g2, i32 0, i32 0), i8 1, i32 1, %s.0* null, %s.0* null }, %s.0 { i8 4, i8 60, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @g3, i32 0, i32 0), i8 1, i32 1, %s.0* null, %s.0* null }], align 8
15@g5 = internal global [64 x i8] zeroinitializer, align 8
16@g6 = internal unnamed_addr global %s.0* null, align 4
17
18; Function Attrs: nounwind
19define %s.1* @f0() #0 {
20b0:
21  %v0 = tail call %s.1* @f1(%s.1* null) #0
22  br label %b1
23
24b1:                                               ; preds = %b1, %b0
25  %v1 = tail call zeroext i8 @f2(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @g5, i32 0, i32 0)) #0
26  switch i8 %v1, label %b1 [
27    i8 8, label %b2
28    i8 6, label %b2
29  ]
30
31b2:                                               ; preds = %b1, %b1
32  ret %s.1* %v0
33}
34
35declare %s.1* @f1(%s.1*) #0
36
37declare zeroext i8 @f2(i8*) #0
38
39; Function Attrs: nounwind
40define void @f3() #0 {
41b0:
42  store %s.0* getelementptr inbounds ([4 x %s.0], [4 x %s.0]* @g4, i32 0, i32 0), %s.0** @g6, align 4
43  store %s.0* getelementptr inbounds ([4 x %s.0], [4 x %s.0]* @g4, i32 0, i32 0), %s.0** getelementptr inbounds ([4 x %s.0], [4 x %s.0]* @g4, i32 0, i32 0, i32 5), align 8
44  store %s.0* getelementptr inbounds ([4 x %s.0], [4 x %s.0]* @g4, i32 0, i32 0), %s.0** getelementptr inbounds ([4 x %s.0], [4 x %s.0]* @g4, i32 0, i32 0, i32 6), align 4
45  %v0 = load i8*, i8** getelementptr inbounds ([4 x %s.0], [4 x %s.0]* @g4, i32 0, i32 1, i32 2), align 4
46  br label %b1
47
48b1:                                               ; preds = %b1, %b0
49  %v1 = phi %s.0* [ getelementptr inbounds ([4 x %s.0], [4 x %s.0]* @g4, i32 0, i32 0), %b0 ], [ %v9, %b1 ]
50  %v2 = getelementptr inbounds %s.0, %s.0* %v1, i32 0, i32 2
51  %v3 = load i8*, i8** %v2, align 4
52  %v4 = tail call i32 @f4(i8* %v0, i8* %v3) #0
53  %v5 = icmp sgt i32 %v4, 0
54  %v6 = getelementptr inbounds %s.0, %s.0* %v1, i32 0, i32 5
55  %v7 = getelementptr inbounds %s.0, %s.0* %v1, i32 0, i32 6
56  %v8 = select i1 %v5, %s.0** %v6, %s.0** %v7
57  %v9 = load %s.0*, %s.0** %v8, align 4
58  %v10 = icmp eq %s.0* %v9, null
59  br i1 %v10, label %b2, label %b1
60
61b2:                                               ; preds = %b1
62  %v11 = phi i32 [ %v4, %b1 ]
63  %v12 = phi %s.0* [ %v1, %b1 ]
64  %v13 = icmp sgt i32 %v11, 0
65  br i1 %v13, label %b3, label %b4
66
67b3:                                               ; preds = %b2
68  %v14 = getelementptr inbounds %s.0, %s.0* %v12, i32 0, i32 5
69  store %s.0* getelementptr inbounds ([4 x %s.0], [4 x %s.0]* @g4, i32 0, i32 1), %s.0** %v14, align 4
70  br label %b4
71
72b4:                                               ; preds = %b3, %b2
73  %v15 = getelementptr inbounds %s.0, %s.0* %v12, i32 0, i32 6
74  store %s.0* getelementptr inbounds ([4 x %s.0], [4 x %s.0]* @g4, i32 0, i32 1), %s.0** %v15, align 4
75  %v16 = load %s.0*, %s.0** @g6, align 4
76  %v17 = icmp eq %s.0* %v16, null
77  br i1 %v17, label %b8, label %b5
78
79b5:                                               ; preds = %b4
80  %v18 = load i8*, i8** getelementptr inbounds ([4 x %s.0], [4 x %s.0]* @g4, i32 0, i32 2, i32 2), align 4
81  br label %b6
82
83b6:                                               ; preds = %b6, %b5
84  %v19 = phi %s.0* [ %v16, %b5 ], [ %v27, %b6 ]
85  %v20 = getelementptr inbounds %s.0, %s.0* %v19, i32 0, i32 2
86  %v21 = load i8*, i8** %v20, align 4
87  %v22 = tail call i32 @f4(i8* %v18, i8* %v21) #0
88  %v23 = icmp sgt i32 %v22, 0
89  %v24 = getelementptr inbounds %s.0, %s.0* %v19, i32 0, i32 5
90  %v25 = getelementptr inbounds %s.0, %s.0* %v19, i32 0, i32 6
91  %v26 = select i1 %v23, %s.0** %v24, %s.0** %v25
92  %v27 = load %s.0*, %s.0** %v26, align 4
93  %v28 = icmp eq %s.0* %v27, null
94  br i1 %v28, label %b7, label %b6
95
96b7:                                               ; preds = %b6
97  %v29 = phi i32 [ %v22, %b6 ]
98  %v30 = phi %s.0* [ %v19, %b6 ]
99  br label %b8
100
101b8:                                               ; preds = %b7, %b4
102  %v31 = phi i32 [ %v11, %b4 ], [ %v29, %b7 ]
103  %v32 = phi %s.0* [ null, %b4 ], [ %v30, %b7 ]
104  %v33 = icmp sgt i32 %v31, 0
105  br i1 %v33, label %b9, label %b10
106
107b9:                                               ; preds = %b8
108  %v34 = getelementptr inbounds %s.0, %s.0* %v32, i32 0, i32 5
109  store %s.0* getelementptr inbounds ([4 x %s.0], [4 x %s.0]* @g4, i32 0, i32 2), %s.0** %v34, align 4
110  br label %b10
111
112b10:                                              ; preds = %b9, %b8
113  %v35 = getelementptr inbounds %s.0, %s.0* %v32, i32 0, i32 6
114  store %s.0* getelementptr inbounds ([4 x %s.0], [4 x %s.0]* @g4, i32 0, i32 2), %s.0** %v35, align 4
115  %v36 = load %s.0*, %s.0** @g6, align 4
116  %v37 = icmp eq %s.0* %v36, null
117  br i1 %v37, label %b14, label %b11
118
119b11:                                              ; preds = %b10
120  %v38 = load i8*, i8** getelementptr inbounds ([4 x %s.0], [4 x %s.0]* @g4, i32 0, i32 3, i32 2), align 4
121  br label %b12
122
123b12:                                              ; preds = %b12, %b11
124  %v39 = phi %s.0* [ %v36, %b11 ], [ %v47, %b12 ]
125  %v40 = getelementptr inbounds %s.0, %s.0* %v39, i32 0, i32 2
126  %v41 = load i8*, i8** %v40, align 4
127  %v42 = tail call i32 @f4(i8* %v38, i8* %v41) #0
128  %v43 = icmp sgt i32 %v42, 0
129  %v44 = getelementptr inbounds %s.0, %s.0* %v39, i32 0, i32 5
130  %v45 = getelementptr inbounds %s.0, %s.0* %v39, i32 0, i32 6
131  %v46 = select i1 %v43, %s.0** %v44, %s.0** %v45
132  %v47 = load %s.0*, %s.0** %v46, align 4
133  %v48 = icmp eq %s.0* %v47, null
134  br i1 %v48, label %b13, label %b12
135
136b13:                                              ; preds = %b12
137  %v49 = phi i32 [ %v42, %b12 ]
138  %v50 = phi %s.0* [ %v39, %b12 ]
139  br label %b14
140
141b14:                                              ; preds = %b13, %b10
142  %v51 = phi i32 [ %v31, %b10 ], [ %v49, %b13 ]
143  %v52 = phi %s.0* [ null, %b10 ], [ %v50, %b13 ]
144  %v53 = icmp sgt i32 %v51, 0
145  br i1 %v53, label %b15, label %b16
146
147b15:                                              ; preds = %b14
148  %v54 = getelementptr inbounds %s.0, %s.0* %v52, i32 0, i32 5
149  store %s.0* getelementptr inbounds ([4 x %s.0], [4 x %s.0]* @g4, i32 0, i32 3), %s.0** %v54, align 4
150  br label %b16
151
152b16:                                              ; preds = %b15, %b14
153  %v55 = getelementptr inbounds %s.0, %s.0* %v52, i32 0, i32 6
154  store %s.0* getelementptr inbounds ([4 x %s.0], [4 x %s.0]* @g4, i32 0, i32 3), %s.0** %v55, align 4
155  ret void
156}
157
158; Function Attrs: nounwind readonly
159declare i32 @f4(i8* nocapture, i8* nocapture) #1
160
161attributes #0 = { nounwind }
162attributes #1 = { nounwind readonly }
163