1 ; NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 ; RUN: llc -O0 -mtriple=mipsel-linux-gnu -global-isel -stop-after=irtranslator -verify-machineinstrs %s -o - | FileCheck %s -check-prefixes=MIPS32
5 define signext i8 @sext_arg_i8(i8 signext %a) {
6 ; MIPS32-LABEL: name: sext_arg_i8
8 ; MIPS32-NEXT: liveins: $a0
10 ; MIPS32-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
11 ; MIPS32-NEXT: [[ASSERT_SEXT:%[0-9]+]]:_(s32) = G_ASSERT_SEXT [[COPY]], 8
12 ; MIPS32-NEXT: [[TRUNC:%[0-9]+]]:_(s8) = G_TRUNC [[ASSERT_SEXT]](s32)
13 ; MIPS32-NEXT: [[SEXT:%[0-9]+]]:_(s32) = G_SEXT [[TRUNC]](s8)
14 ; MIPS32-NEXT: $v0 = COPY [[SEXT]](s32)
15 ; MIPS32-NEXT: RetRA implicit $v0
20 define zeroext i8 @zext_arg_i8(i8 zeroext %a) {
21 ; MIPS32-LABEL: name: zext_arg_i8
23 ; MIPS32-NEXT: liveins: $a0
25 ; MIPS32-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
26 ; MIPS32-NEXT: [[ASSERT_ZEXT:%[0-9]+]]:_(s32) = G_ASSERT_ZEXT [[COPY]], 8
27 ; MIPS32-NEXT: [[TRUNC:%[0-9]+]]:_(s8) = G_TRUNC [[ASSERT_ZEXT]](s32)
28 ; MIPS32-NEXT: [[ZEXT:%[0-9]+]]:_(s32) = G_ZEXT [[TRUNC]](s8)
29 ; MIPS32-NEXT: $v0 = COPY [[ZEXT]](s32)
30 ; MIPS32-NEXT: RetRA implicit $v0
35 define i8 @aext_arg_i8(i8 %a) {
36 ; MIPS32-LABEL: name: aext_arg_i8
38 ; MIPS32-NEXT: liveins: $a0
40 ; MIPS32-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
41 ; MIPS32-NEXT: [[TRUNC:%[0-9]+]]:_(s8) = G_TRUNC [[COPY]](s32)
42 ; MIPS32-NEXT: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[TRUNC]](s8)
43 ; MIPS32-NEXT: $v0 = COPY [[ANYEXT]](s32)
44 ; MIPS32-NEXT: RetRA implicit $v0
49 declare signext i8 @sext_stack_arg_i8(i32 %x1, i32 %x2, i32 %x3, i32 %x4, i8 %a)
50 declare zeroext i8 @zext_stack_arg_i8(i32 %x1, i32 %x2, i32 %x3, i32 %x4, i8 %a)
51 declare i8 @aext_stack_arg_i8(i32 %x1, i32 %x2, i32 %x3, i32 %x4, i8 %a)
53 define signext i8 @call_sext_stack_arg_i8(i32 %x1, i32 %x2, i32 %x3, i32 %x4, i8 signext %a) {
54 ; MIPS32-LABEL: name: call_sext_stack_arg_i8
56 ; MIPS32-NEXT: liveins: $a0, $a1, $a2, $a3
58 ; MIPS32-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
59 ; MIPS32-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $a1
60 ; MIPS32-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $a2
61 ; MIPS32-NEXT: [[COPY3:%[0-9]+]]:_(s32) = COPY $a3
62 ; MIPS32-NEXT: [[FRAME_INDEX:%[0-9]+]]:_(p0) = G_FRAME_INDEX %fixed-stack.0
63 ; MIPS32-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[FRAME_INDEX]](p0) :: (load (s32) from %fixed-stack.0, align 8)
64 ; MIPS32-NEXT: [[ASSERT_SEXT:%[0-9]+]]:_(s32) = G_ASSERT_SEXT [[LOAD]], 8
65 ; MIPS32-NEXT: [[TRUNC:%[0-9]+]]:_(s8) = G_TRUNC [[ASSERT_SEXT]](s32)
66 ; MIPS32-NEXT: ADJCALLSTACKDOWN 24, 0, implicit-def $sp, implicit $sp
67 ; MIPS32-NEXT: [[SEXT:%[0-9]+]]:_(s32) = G_SEXT [[TRUNC]](s8)
68 ; MIPS32-NEXT: [[COPY4:%[0-9]+]]:_(p0) = COPY $sp
69 ; MIPS32-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
70 ; MIPS32-NEXT: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD [[COPY4]], [[C]](s32)
71 ; MIPS32-NEXT: G_STORE [[SEXT]](s32), [[PTR_ADD]](p0) :: (store (s32) into stack + 16, align 8)
72 ; MIPS32-NEXT: $a0 = COPY [[COPY]](s32)
73 ; MIPS32-NEXT: $a1 = COPY [[COPY1]](s32)
74 ; MIPS32-NEXT: $a2 = COPY [[COPY2]](s32)
75 ; MIPS32-NEXT: $a3 = COPY [[COPY3]](s32)
76 ; MIPS32-NEXT: JAL @sext_stack_arg_i8, csr_o32, implicit-def $ra, implicit-def $sp, implicit $a0, implicit $a1, implicit $a2, implicit $a3, implicit-def $v0
77 ; MIPS32-NEXT: [[COPY5:%[0-9]+]]:_(s32) = COPY $v0
78 ; MIPS32-NEXT: [[ASSERT_SEXT1:%[0-9]+]]:_(s32) = G_ASSERT_SEXT [[COPY5]], 8
79 ; MIPS32-NEXT: [[TRUNC1:%[0-9]+]]:_(s8) = G_TRUNC [[ASSERT_SEXT1]](s32)
80 ; MIPS32-NEXT: ADJCALLSTACKUP 24, 0, implicit-def $sp, implicit $sp
81 ; MIPS32-NEXT: [[SEXT1:%[0-9]+]]:_(s32) = G_SEXT [[TRUNC1]](s8)
82 ; MIPS32-NEXT: $v0 = COPY [[SEXT1]](s32)
83 ; MIPS32-NEXT: RetRA implicit $v0
85 %call = call signext i8 @sext_stack_arg_i8(i32 %x1, i32 %x2, i32 %x3, i32 %x4, i8 signext %a)
89 define zeroext i8 @call_zext_stack_arg_i8(i32 %x1, i32 %x2, i32 %x3, i32 %x4, i8 zeroext %a) {
90 ; MIPS32-LABEL: name: call_zext_stack_arg_i8
92 ; MIPS32-NEXT: liveins: $a0, $a1, $a2, $a3
94 ; MIPS32-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
95 ; MIPS32-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $a1
96 ; MIPS32-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $a2
97 ; MIPS32-NEXT: [[COPY3:%[0-9]+]]:_(s32) = COPY $a3
98 ; MIPS32-NEXT: [[FRAME_INDEX:%[0-9]+]]:_(p0) = G_FRAME_INDEX %fixed-stack.0
99 ; MIPS32-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[FRAME_INDEX]](p0) :: (load (s32) from %fixed-stack.0, align 8)
100 ; MIPS32-NEXT: [[ASSERT_ZEXT:%[0-9]+]]:_(s32) = G_ASSERT_ZEXT [[LOAD]], 8
101 ; MIPS32-NEXT: [[TRUNC:%[0-9]+]]:_(s8) = G_TRUNC [[ASSERT_ZEXT]](s32)
102 ; MIPS32-NEXT: ADJCALLSTACKDOWN 24, 0, implicit-def $sp, implicit $sp
103 ; MIPS32-NEXT: [[ZEXT:%[0-9]+]]:_(s32) = G_ZEXT [[TRUNC]](s8)
104 ; MIPS32-NEXT: [[COPY4:%[0-9]+]]:_(p0) = COPY $sp
105 ; MIPS32-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
106 ; MIPS32-NEXT: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD [[COPY4]], [[C]](s32)
107 ; MIPS32-NEXT: G_STORE [[ZEXT]](s32), [[PTR_ADD]](p0) :: (store (s32) into stack + 16, align 8)
108 ; MIPS32-NEXT: $a0 = COPY [[COPY]](s32)
109 ; MIPS32-NEXT: $a1 = COPY [[COPY1]](s32)
110 ; MIPS32-NEXT: $a2 = COPY [[COPY2]](s32)
111 ; MIPS32-NEXT: $a3 = COPY [[COPY3]](s32)
112 ; MIPS32-NEXT: JAL @zext_stack_arg_i8, csr_o32, implicit-def $ra, implicit-def $sp, implicit $a0, implicit $a1, implicit $a2, implicit $a3, implicit-def $v0
113 ; MIPS32-NEXT: [[COPY5:%[0-9]+]]:_(s32) = COPY $v0
114 ; MIPS32-NEXT: [[ASSERT_ZEXT1:%[0-9]+]]:_(s32) = G_ASSERT_ZEXT [[COPY5]], 8
115 ; MIPS32-NEXT: [[TRUNC1:%[0-9]+]]:_(s8) = G_TRUNC [[ASSERT_ZEXT1]](s32)
116 ; MIPS32-NEXT: ADJCALLSTACKUP 24, 0, implicit-def $sp, implicit $sp
117 ; MIPS32-NEXT: [[ZEXT1:%[0-9]+]]:_(s32) = G_ZEXT [[TRUNC1]](s8)
118 ; MIPS32-NEXT: $v0 = COPY [[ZEXT1]](s32)
119 ; MIPS32-NEXT: RetRA implicit $v0
121 %call = call zeroext i8 @zext_stack_arg_i8(i32 %x1, i32 %x2, i32 %x3, i32 %x4, i8 zeroext %a)
125 define i8 @call_aext_stack_arg_i8(i32 %x1, i32 %x2, i32 %x3, i32 %x4, i8 %a) {
126 ; MIPS32-LABEL: name: call_aext_stack_arg_i8
127 ; MIPS32: bb.1.entry:
128 ; MIPS32-NEXT: liveins: $a0, $a1, $a2, $a3
129 ; MIPS32-NEXT: {{ $}}
130 ; MIPS32-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
131 ; MIPS32-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $a1
132 ; MIPS32-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $a2
133 ; MIPS32-NEXT: [[COPY3:%[0-9]+]]:_(s32) = COPY $a3
134 ; MIPS32-NEXT: [[FRAME_INDEX:%[0-9]+]]:_(p0) = G_FRAME_INDEX %fixed-stack.0
135 ; MIPS32-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[FRAME_INDEX]](p0) :: (load (s32) from %fixed-stack.0, align 8)
136 ; MIPS32-NEXT: [[TRUNC:%[0-9]+]]:_(s8) = G_TRUNC [[LOAD]](s32)
137 ; MIPS32-NEXT: ADJCALLSTACKDOWN 24, 0, implicit-def $sp, implicit $sp
138 ; MIPS32-NEXT: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[TRUNC]](s8)
139 ; MIPS32-NEXT: [[COPY4:%[0-9]+]]:_(p0) = COPY $sp
140 ; MIPS32-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
141 ; MIPS32-NEXT: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD [[COPY4]], [[C]](s32)
142 ; MIPS32-NEXT: G_STORE [[ANYEXT]](s32), [[PTR_ADD]](p0) :: (store (s32) into stack + 16, align 8)
143 ; MIPS32-NEXT: $a0 = COPY [[COPY]](s32)
144 ; MIPS32-NEXT: $a1 = COPY [[COPY1]](s32)
145 ; MIPS32-NEXT: $a2 = COPY [[COPY2]](s32)
146 ; MIPS32-NEXT: $a3 = COPY [[COPY3]](s32)
147 ; MIPS32-NEXT: JAL @aext_stack_arg_i8, csr_o32, implicit-def $ra, implicit-def $sp, implicit $a0, implicit $a1, implicit $a2, implicit $a3, implicit-def $v0
148 ; MIPS32-NEXT: [[COPY5:%[0-9]+]]:_(s32) = COPY $v0
149 ; MIPS32-NEXT: [[TRUNC1:%[0-9]+]]:_(s8) = G_TRUNC [[COPY5]](s32)
150 ; MIPS32-NEXT: ADJCALLSTACKUP 24, 0, implicit-def $sp, implicit $sp
151 ; MIPS32-NEXT: [[ANYEXT1:%[0-9]+]]:_(s32) = G_ANYEXT [[TRUNC1]](s8)
152 ; MIPS32-NEXT: $v0 = COPY [[ANYEXT1]](s32)
153 ; MIPS32-NEXT: RetRA implicit $v0
155 %call = call i8 @aext_stack_arg_i8(i32 %x1, i32 %x2, i32 %x3, i32 %x4, i8 %a)
160 define signext i16 @sext_arg_i16(i16 signext %a) {
161 ; MIPS32-LABEL: name: sext_arg_i16
162 ; MIPS32: bb.1.entry:
163 ; MIPS32-NEXT: liveins: $a0
164 ; MIPS32-NEXT: {{ $}}
165 ; MIPS32-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
166 ; MIPS32-NEXT: [[ASSERT_SEXT:%[0-9]+]]:_(s32) = G_ASSERT_SEXT [[COPY]], 16
167 ; MIPS32-NEXT: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[ASSERT_SEXT]](s32)
168 ; MIPS32-NEXT: [[SEXT:%[0-9]+]]:_(s32) = G_SEXT [[TRUNC]](s16)
169 ; MIPS32-NEXT: $v0 = COPY [[SEXT]](s32)
170 ; MIPS32-NEXT: RetRA implicit $v0
175 define zeroext i16 @zext_arg_i16(i16 zeroext %a) {
176 ; MIPS32-LABEL: name: zext_arg_i16
177 ; MIPS32: bb.1.entry:
178 ; MIPS32-NEXT: liveins: $a0
179 ; MIPS32-NEXT: {{ $}}
180 ; MIPS32-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
181 ; MIPS32-NEXT: [[ASSERT_ZEXT:%[0-9]+]]:_(s32) = G_ASSERT_ZEXT [[COPY]], 16
182 ; MIPS32-NEXT: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[ASSERT_ZEXT]](s32)
183 ; MIPS32-NEXT: [[ZEXT:%[0-9]+]]:_(s32) = G_ZEXT [[TRUNC]](s16)
184 ; MIPS32-NEXT: $v0 = COPY [[ZEXT]](s32)
185 ; MIPS32-NEXT: RetRA implicit $v0
190 define i16 @aext_arg_i16(i16 %a) {
191 ; MIPS32-LABEL: name: aext_arg_i16
192 ; MIPS32: bb.1.entry:
193 ; MIPS32-NEXT: liveins: $a0
194 ; MIPS32-NEXT: {{ $}}
195 ; MIPS32-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
196 ; MIPS32-NEXT: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY]](s32)
197 ; MIPS32-NEXT: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[TRUNC]](s16)
198 ; MIPS32-NEXT: $v0 = COPY [[ANYEXT]](s32)
199 ; MIPS32-NEXT: RetRA implicit $v0
204 declare signext i16 @sext_stack_arg_i16(i32 %x1, i32 %x2, i32 %x3, i32 %x4, i16 %a)
205 declare zeroext i16 @zext_stack_arg_i16(i32 %x1, i32 %x2, i32 %x3, i32 %x4, i16 %a)
206 declare i16 @aext_stack_arg_i16(i32 %x1, i32 %x2, i32 %x3, i32 %x4, i16 %a)
208 define signext i16 @call_sext_stack_arg_i16(i32 %x1, i32 %x2, i32 %x3, i32 %x4, i16 signext %a) {
209 ; MIPS32-LABEL: name: call_sext_stack_arg_i16
210 ; MIPS32: bb.1.entry:
211 ; MIPS32-NEXT: liveins: $a0, $a1, $a2, $a3
212 ; MIPS32-NEXT: {{ $}}
213 ; MIPS32-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
214 ; MIPS32-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $a1
215 ; MIPS32-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $a2
216 ; MIPS32-NEXT: [[COPY3:%[0-9]+]]:_(s32) = COPY $a3
217 ; MIPS32-NEXT: [[FRAME_INDEX:%[0-9]+]]:_(p0) = G_FRAME_INDEX %fixed-stack.0
218 ; MIPS32-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[FRAME_INDEX]](p0) :: (load (s32) from %fixed-stack.0, align 8)
219 ; MIPS32-NEXT: [[ASSERT_SEXT:%[0-9]+]]:_(s32) = G_ASSERT_SEXT [[LOAD]], 16
220 ; MIPS32-NEXT: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[ASSERT_SEXT]](s32)
221 ; MIPS32-NEXT: ADJCALLSTACKDOWN 24, 0, implicit-def $sp, implicit $sp
222 ; MIPS32-NEXT: [[SEXT:%[0-9]+]]:_(s32) = G_SEXT [[TRUNC]](s16)
223 ; MIPS32-NEXT: [[COPY4:%[0-9]+]]:_(p0) = COPY $sp
224 ; MIPS32-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
225 ; MIPS32-NEXT: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD [[COPY4]], [[C]](s32)
226 ; MIPS32-NEXT: G_STORE [[SEXT]](s32), [[PTR_ADD]](p0) :: (store (s32) into stack + 16, align 8)
227 ; MIPS32-NEXT: $a0 = COPY [[COPY]](s32)
228 ; MIPS32-NEXT: $a1 = COPY [[COPY1]](s32)
229 ; MIPS32-NEXT: $a2 = COPY [[COPY2]](s32)
230 ; MIPS32-NEXT: $a3 = COPY [[COPY3]](s32)
231 ; MIPS32-NEXT: JAL @sext_stack_arg_i16, csr_o32, implicit-def $ra, implicit-def $sp, implicit $a0, implicit $a1, implicit $a2, implicit $a3, implicit-def $v0
232 ; MIPS32-NEXT: [[COPY5:%[0-9]+]]:_(s32) = COPY $v0
233 ; MIPS32-NEXT: [[ASSERT_SEXT1:%[0-9]+]]:_(s32) = G_ASSERT_SEXT [[COPY5]], 16
234 ; MIPS32-NEXT: [[TRUNC1:%[0-9]+]]:_(s16) = G_TRUNC [[ASSERT_SEXT1]](s32)
235 ; MIPS32-NEXT: ADJCALLSTACKUP 24, 0, implicit-def $sp, implicit $sp
236 ; MIPS32-NEXT: [[SEXT1:%[0-9]+]]:_(s32) = G_SEXT [[TRUNC1]](s16)
237 ; MIPS32-NEXT: $v0 = COPY [[SEXT1]](s32)
238 ; MIPS32-NEXT: RetRA implicit $v0
240 %call = call signext i16 @sext_stack_arg_i16(i32 %x1, i32 %x2, i32 %x3, i32 %x4, i16 signext %a)
244 define zeroext i16 @call_zext_stack_arg_i16(i32 %x1, i32 %x2, i32 %x3, i32 %x4, i16 zeroext %a) {
245 ; MIPS32-LABEL: name: call_zext_stack_arg_i16
246 ; MIPS32: bb.1.entry:
247 ; MIPS32-NEXT: liveins: $a0, $a1, $a2, $a3
248 ; MIPS32-NEXT: {{ $}}
249 ; MIPS32-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
250 ; MIPS32-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $a1
251 ; MIPS32-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $a2
252 ; MIPS32-NEXT: [[COPY3:%[0-9]+]]:_(s32) = COPY $a3
253 ; MIPS32-NEXT: [[FRAME_INDEX:%[0-9]+]]:_(p0) = G_FRAME_INDEX %fixed-stack.0
254 ; MIPS32-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[FRAME_INDEX]](p0) :: (load (s32) from %fixed-stack.0, align 8)
255 ; MIPS32-NEXT: [[ASSERT_ZEXT:%[0-9]+]]:_(s32) = G_ASSERT_ZEXT [[LOAD]], 16
256 ; MIPS32-NEXT: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[ASSERT_ZEXT]](s32)
257 ; MIPS32-NEXT: ADJCALLSTACKDOWN 24, 0, implicit-def $sp, implicit $sp
258 ; MIPS32-NEXT: [[ZEXT:%[0-9]+]]:_(s32) = G_ZEXT [[TRUNC]](s16)
259 ; MIPS32-NEXT: [[COPY4:%[0-9]+]]:_(p0) = COPY $sp
260 ; MIPS32-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
261 ; MIPS32-NEXT: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD [[COPY4]], [[C]](s32)
262 ; MIPS32-NEXT: G_STORE [[ZEXT]](s32), [[PTR_ADD]](p0) :: (store (s32) into stack + 16, align 8)
263 ; MIPS32-NEXT: $a0 = COPY [[COPY]](s32)
264 ; MIPS32-NEXT: $a1 = COPY [[COPY1]](s32)
265 ; MIPS32-NEXT: $a2 = COPY [[COPY2]](s32)
266 ; MIPS32-NEXT: $a3 = COPY [[COPY3]](s32)
267 ; MIPS32-NEXT: JAL @zext_stack_arg_i16, csr_o32, implicit-def $ra, implicit-def $sp, implicit $a0, implicit $a1, implicit $a2, implicit $a3, implicit-def $v0
268 ; MIPS32-NEXT: [[COPY5:%[0-9]+]]:_(s32) = COPY $v0
269 ; MIPS32-NEXT: [[ASSERT_ZEXT1:%[0-9]+]]:_(s32) = G_ASSERT_ZEXT [[COPY5]], 16
270 ; MIPS32-NEXT: [[TRUNC1:%[0-9]+]]:_(s16) = G_TRUNC [[ASSERT_ZEXT1]](s32)
271 ; MIPS32-NEXT: ADJCALLSTACKUP 24, 0, implicit-def $sp, implicit $sp
272 ; MIPS32-NEXT: [[ZEXT1:%[0-9]+]]:_(s32) = G_ZEXT [[TRUNC1]](s16)
273 ; MIPS32-NEXT: $v0 = COPY [[ZEXT1]](s32)
274 ; MIPS32-NEXT: RetRA implicit $v0
276 %call = call zeroext i16 @zext_stack_arg_i16(i32 %x1, i32 %x2, i32 %x3, i32 %x4, i16 zeroext %a)
280 define i16 @call_aext_stack_arg_i16(i32 %x1, i32 %x2, i32 %x3, i32 %x4, i16 %a) {
281 ; MIPS32-LABEL: name: call_aext_stack_arg_i16
282 ; MIPS32: bb.1.entry:
283 ; MIPS32-NEXT: liveins: $a0, $a1, $a2, $a3
284 ; MIPS32-NEXT: {{ $}}
285 ; MIPS32-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
286 ; MIPS32-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $a1
287 ; MIPS32-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $a2
288 ; MIPS32-NEXT: [[COPY3:%[0-9]+]]:_(s32) = COPY $a3
289 ; MIPS32-NEXT: [[FRAME_INDEX:%[0-9]+]]:_(p0) = G_FRAME_INDEX %fixed-stack.0
290 ; MIPS32-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[FRAME_INDEX]](p0) :: (load (s32) from %fixed-stack.0, align 8)
291 ; MIPS32-NEXT: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[LOAD]](s32)
292 ; MIPS32-NEXT: ADJCALLSTACKDOWN 24, 0, implicit-def $sp, implicit $sp
293 ; MIPS32-NEXT: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[TRUNC]](s16)
294 ; MIPS32-NEXT: [[COPY4:%[0-9]+]]:_(p0) = COPY $sp
295 ; MIPS32-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
296 ; MIPS32-NEXT: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD [[COPY4]], [[C]](s32)
297 ; MIPS32-NEXT: G_STORE [[ANYEXT]](s32), [[PTR_ADD]](p0) :: (store (s32) into stack + 16, align 8)
298 ; MIPS32-NEXT: $a0 = COPY [[COPY]](s32)
299 ; MIPS32-NEXT: $a1 = COPY [[COPY1]](s32)
300 ; MIPS32-NEXT: $a2 = COPY [[COPY2]](s32)
301 ; MIPS32-NEXT: $a3 = COPY [[COPY3]](s32)
302 ; MIPS32-NEXT: JAL @aext_stack_arg_i16, csr_o32, implicit-def $ra, implicit-def $sp, implicit $a0, implicit $a1, implicit $a2, implicit $a3, implicit-def $v0
303 ; MIPS32-NEXT: [[COPY5:%[0-9]+]]:_(s32) = COPY $v0
304 ; MIPS32-NEXT: [[TRUNC1:%[0-9]+]]:_(s16) = G_TRUNC [[COPY5]](s32)
305 ; MIPS32-NEXT: ADJCALLSTACKUP 24, 0, implicit-def $sp, implicit $sp
306 ; MIPS32-NEXT: [[ANYEXT1:%[0-9]+]]:_(s32) = G_ANYEXT [[TRUNC1]](s16)
307 ; MIPS32-NEXT: $v0 = COPY [[ANYEXT1]](s32)
308 ; MIPS32-NEXT: RetRA implicit $v0
310 %call = call i16 @aext_stack_arg_i16(i32 %x1, i32 %x2, i32 %x3, i32 %x4, i16 %a)