1; RUN: llc -march=hexagon < %s
2; REQUIRES: asserts
3
4target triple = "hexagon"
5
6%s.0 = type { i32*, i32*, i32* }
7%s.1 = type { i32*, i32*, i32* }
8%s.2 = type { i32*, i32**, i32**, i32**, i32***, i32* }
9%s.3 = type { i32*, i32*, i32* }
10%s.4 = type { i32*, i32*, i32* }
11%s.5 = type { i32*, i32*, i32 }
12
13; Function Attrs: nounwind optsize
14declare zeroext i1 @f0(i32*) #0 align 2
15
16; Function Attrs: nounwind optsize
17declare zeroext i1 @f1(i32*) #0 align 2
18
19; Function Attrs: optsize
20declare hidden void @f2(i32* noalias nocapture sret, i32) #1 align 2
21
22; Function Attrs: optsize
23declare hidden void @f3(i32* noalias nocapture sret, i32) #1 align 2
24
25; Function Attrs: optsize
26declare hidden void @f4(i32* noalias nocapture sret, i32) #1 align 2
27
28; Function Attrs: optsize
29declare hidden void @f5(i32* noalias nocapture sret, i32) #1 align 2
30
31; Function Attrs: optsize
32declare hidden void @f6(i32* noalias nocapture sret, i32) #1 align 2
33
34; Function Attrs: optsize
35declare hidden void @f7(i32* noalias nocapture sret, i32) #1 align 2
36
37; Function Attrs: optsize
38declare zeroext i1 @f8(i32*, i32*, i64) #1 align 2
39
40; Function Attrs: nounwind optsize
41declare i32* @f9(i32* nocapture readonly) #0 align 2
42
43; Function Attrs: optsize
44define void @f10(i32* %a0, i32* dereferenceable(64) %a1) #1 align 2 {
45b0:
46  %v0 = alloca %s.0, align 4
47  %v1 = alloca %s.1, align 4
48  %v2 = alloca %s.2, align 4
49  %v3 = alloca %s.3, align 4
50  %v4 = alloca %s.4, align 4
51  %v5 = alloca %s.5, align 8
52  br i1 undef, label %b34, label %b1
53
54b1:                                               ; preds = %b0
55  br i1 undef, label %b3, label %b2
56
57b2:                                               ; preds = %b1
58  %v6 = ptrtoint %s.0* %v0 to i32
59  %v7 = zext i32 %v6 to i64
60  %v8 = shl nuw i64 %v7, 32
61  %v9 = or i64 %v8, zext (i32 ptrtoint (void (i32*, i32)* @f2 to i32) to i64)
62  %v10 = ptrtoint %s.4* %v4 to i32
63  %v11 = zext i32 %v10 to i64
64  %v12 = shl nuw i64 %v11, 32
65  %v13 = or i64 %v12, zext (i32 ptrtoint (void (i32*, i32)* @f5 to i32) to i64)
66  %v14 = ptrtoint %s.5* %v5 to i32
67  %v15 = zext i32 %v14 to i64
68  %v16 = shl nuw i64 %v15, 32
69  %v17 = or i64 %v16, zext (i32 ptrtoint (void (i32*, i32)* @f6 to i32) to i64)
70  %v18 = ptrtoint %s.1* %v1 to i32
71  %v19 = zext i32 %v18 to i64
72  %v20 = shl nuw i64 %v19, 32
73  %v21 = or i64 %v20, zext (i32 ptrtoint (void (i32*, i32)* @f3 to i32) to i64)
74  %v22 = ptrtoint %s.2* %v2 to i32
75  %v23 = zext i32 %v22 to i64
76  %v24 = shl nuw i64 %v23, 32
77  %v25 = or i64 %v24, zext (i32 ptrtoint (void (i32*, i32)* @f4 to i32) to i64)
78  %v26 = ptrtoint %s.3* %v3 to i32
79  %v27 = zext i32 %v26 to i64
80  %v28 = shl nuw i64 %v27, 32
81  %v29 = or i64 %v28, zext (i32 ptrtoint (void (i32*, i32)* @f7 to i32) to i64)
82  %v30 = call i32* @f9(i32* nonnull null) #1
83  br i1 undef, label %b5, label %b4
84
85b3:                                               ; preds = %b1
86  unreachable
87
88b4:                                               ; preds = %b2
89  store i32* null, i32** null, align 4
90  %v31 = call zeroext i1 @f0(i32* null) #0
91  br i1 %v31, label %b6, label %b32
92
93b5:                                               ; preds = %b2
94  unreachable
95
96b6:                                               ; preds = %b4
97  br i1 undef, label %b7, label %b32
98
99b7:                                               ; preds = %b6
100  br i1 undef, label %b8, label %b32
101
102b8:                                               ; preds = %b7
103  br i1 undef, label %b9, label %b32
104
105b9:                                               ; preds = %b8
106  br i1 undef, label %b10, label %b32
107
108b10:                                              ; preds = %b9
109  %v32 = call zeroext i1 @f1(i32* null) #0
110  br i1 %v32, label %b11, label %b32
111
112b11:                                              ; preds = %b10
113  br i1 undef, label %b13, label %b12
114
115b12:                                              ; preds = %b11
116  unreachable
117
118b13:                                              ; preds = %b11
119  %v33 = call zeroext i1 @f0(i32* undef) #0
120  br i1 %v33, label %b14, label %b32
121
122b14:                                              ; preds = %b13
123  br i1 undef, label %b16, label %b15
124
125b15:                                              ; preds = %b14
126  unreachable
127
128b16:                                              ; preds = %b14
129  %v34 = call zeroext i1 @f1(i32* null) #0
130  br i1 %v34, label %b18, label %b17
131
132b17:                                              ; preds = %b16
133  unreachable
134
135b18:                                              ; preds = %b16
136  br i1 undef, label %b19, label %b32
137
138b19:                                              ; preds = %b18
139  br i1 undef, label %b26, label %b20
140
141b20:                                              ; preds = %b19
142  br i1 undef, label %b22, label %b21
143
144b21:                                              ; preds = %b20
145  br i1 undef, label %b23, label %b32
146
147b22:                                              ; preds = %b20
148  unreachable
149
150b23:                                              ; preds = %b21
151  br i1 undef, label %b24, label %b32
152
153b24:                                              ; preds = %b23
154  %v35 = call zeroext i1 @f8(i32* nonnull %a1, i32* undef, i64 undef) #1
155  br i1 %v35, label %b25, label %b32
156
157b25:                                              ; preds = %b24
158  %v36 = call zeroext i1 @f8(i32* nonnull %a1, i32* undef, i64 %v9) #1
159  unreachable
160
161b26:                                              ; preds = %b19
162  br i1 undef, label %b27, label %b32
163
164b27:                                              ; preds = %b26
165  br i1 undef, label %b28, label %b32
166
167b28:                                              ; preds = %b27
168  br i1 undef, label %b31, label %b29
169
170b29:                                              ; preds = %b28
171  %v37 = call zeroext i1 @f8(i32* nonnull %a1, i32* null, i64 %v21) #1
172  %v38 = call zeroext i1 @f8(i32* nonnull %a1, i32* undef, i64 %v25) #1
173  br i1 %v38, label %b30, label %b32
174
175b30:                                              ; preds = %b29
176  %v39 = call zeroext i1 @f8(i32* nonnull %a1, i32* undef, i64 %v29) #1
177  unreachable
178
179b31:                                              ; preds = %b28
180  %v40 = call zeroext i1 @f8(i32* nonnull %a1, i32* null, i64 %v13) #1
181  %v41 = call zeroext i1 @f8(i32* nonnull %a1, i32* undef, i64 %v17) #1
182  br i1 %v41, label %b33, label %b32
183
184b32:                                              ; preds = %b31, %b29, %b27, %b26, %b24, %b23, %b21, %b18, %b13, %b10, %b9, %b8, %b7, %b6, %b4
185  unreachable
186
187b33:                                              ; preds = %b31
188  store i32* %a0, i32** undef, align 4
189  unreachable
190
191b34:                                              ; preds = %b0
192  ret void
193}
194
195attributes #0 = { nounwind optsize }
196attributes #1 = { optsize }
197