Lines Matching full:off
27 def regPlusImm : PatFrag<(ops node:$addr, node:$off),
28 (add node:$addr, node:$off),
45 def regPlusGA : PatFrag<(ops node:$addr, node:$off),
46 (add node:$addr, node:$off),
61 def LOAD_I32 : I<(outs I32:$dst), (ins i32imm:$off, I32:$addr,
63 "i32.load\t$dst, ${off}(${addr})${p2align}">;
64 def LOAD_I64 : I<(outs I64:$dst), (ins i32imm:$off, I32:$addr,
66 "i64.load\t$dst, ${off}(${addr})${p2align}">;
67 def LOAD_F32 : I<(outs F32:$dst), (ins i32imm:$off, I32:$addr,
69 "f32.load\t$dst, ${off}(${addr})${p2align}">;
70 def LOAD_F64 : I<(outs F64:$dst), (ins i32imm:$off, I32:$addr,
72 "f64.load\t$dst, ${off}(${addr})${p2align}">;
83 def : Pat<(i32 (load (regPlusImm I32:$addr, imm:$off))),
84 (LOAD_I32 imm:$off, $addr, 0)>;
85 def : Pat<(i64 (load (regPlusImm I32:$addr, imm:$off))),
86 (LOAD_I64 imm:$off, $addr, 0)>;
87 def : Pat<(f32 (load (regPlusImm I32:$addr, imm:$off))),
88 (LOAD_F32 imm:$off, $addr, 0)>;
89 def : Pat<(f64 (load (regPlusImm I32:$addr, imm:$off))),
90 (LOAD_F64 imm:$off, $addr, 0)>;
91 def : Pat<(i32 (load (or_is_add I32:$addr, imm:$off))),
92 (LOAD_I32 imm:$off, $addr, 0)>;
93 def : Pat<(i64 (load (or_is_add I32:$addr, imm:$off))),
94 (LOAD_I64 imm:$off, $addr, 0)>;
95 def : Pat<(f32 (load (or_is_add I32:$addr, imm:$off))),
96 (LOAD_F32 imm:$off, $addr, 0)>;
97 def : Pat<(f64 (load (or_is_add I32:$addr, imm:$off))),
98 (LOAD_F64 imm:$off, $addr, 0)>;
100 (WebAssemblywrapper tglobaladdr:$off)))),
101 (LOAD_I32 tglobaladdr:$off, $addr, 0)>;
103 (WebAssemblywrapper tglobaladdr:$off)))),
104 (LOAD_I64 tglobaladdr:$off, $addr, 0)>;
106 (WebAssemblywrapper tglobaladdr:$off)))),
107 (LOAD_F32 tglobaladdr:$off, $addr, 0)>;
109 (WebAssemblywrapper tglobaladdr:$off)))),
110 (LOAD_F64 tglobaladdr:$off, $addr, 0)>;
111 def : Pat<(i32 (load (add I32:$addr, (WebAssemblywrapper texternalsym:$off)))),
112 (LOAD_I32 texternalsym:$off, $addr, 0)>;
113 def : Pat<(i64 (load (add I32:$addr, (WebAssemblywrapper texternalsym:$off)))),
114 (LOAD_I64 texternalsym:$off, $addr, 0)>;
115 def : Pat<(f32 (load (add I32:$addr, (WebAssemblywrapper texternalsym:$off)))),
116 (LOAD_F32 texternalsym:$off, $addr, 0)>;
117 def : Pat<(f64 (load (add I32:$addr, (WebAssemblywrapper texternalsym:$off)))),
118 (LOAD_F64 texternalsym:$off, $addr, 0)>;
121 def : Pat<(i32 (load imm:$off)), (LOAD_I32 imm:$off, (CONST_I32 0), 0)>;
122 def : Pat<(i64 (load imm:$off)), (LOAD_I64 imm:$off, (CONST_I32 0), 0)>;
123 def : Pat<(f32 (load imm:$off)), (LOAD_F32 imm:$off, (CONST_I32 0), 0)>;
124 def : Pat<(f64 (load imm:$off)), (LOAD_F64 imm:$off, (CONST_I32 0), 0)>;
125 def : Pat<(i32 (load (WebAssemblywrapper tglobaladdr:$off))),
126 (LOAD_I32 tglobaladdr:$off, (CONST_I32 0), 0)>;
127 def : Pat<(i64 (load (WebAssemblywrapper tglobaladdr:$off))),
128 (LOAD_I64 tglobaladdr:$off, (CONST_I32 0), 0)>;
129 def : Pat<(f32 (load (WebAssemblywrapper tglobaladdr:$off))),
130 (LOAD_F32 tglobaladdr:$off, (CONST_I32 0), 0)>;
131 def : Pat<(f64 (load (WebAssemblywrapper tglobaladdr:$off))),
132 (LOAD_F64 tglobaladdr:$off, (CONST_I32 0), 0)>;
133 def : Pat<(i32 (load (WebAssemblywrapper texternalsym:$off))),
134 (LOAD_I32 texternalsym:$off, (CONST_I32 0), 0)>;
135 def : Pat<(i64 (load (WebAssemblywrapper texternalsym:$off))),
136 (LOAD_I64 texternalsym:$off, (CONST_I32 0), 0)>;
137 def : Pat<(f32 (load (WebAssemblywrapper texternalsym:$off))),
138 (LOAD_F32 texternalsym:$off, (CONST_I32 0), 0)>;
139 def : Pat<(f64 (load (WebAssemblywrapper texternalsym:$off))),
140 (LOAD_F64 texternalsym:$off, (CONST_I32 0), 0)>;
145 def LOAD8_S_I32 : I<(outs I32:$dst), (ins i32imm:$off, I32:$addr,
147 "i32.load8_s\t$dst, ${off}(${addr})${p2align}">;
148 def LOAD8_U_I32 : I<(outs I32:$dst), (ins i32imm:$off, I32:$addr,
150 "i32.load8_u\t$dst, ${off}(${addr})${p2align}">;
151 def LOAD16_S_I32 : I<(outs I32:$dst), (ins i32imm:$off, I32:$addr,
153 "i32.load16_s\t$dst, ${off}(${addr})${p2align}">;
154 def LOAD16_U_I32 : I<(outs I32:$dst), (ins i32imm:$off, I32:$addr,
156 "i32.load16_u\t$dst, ${off}(${addr})${p2align}">;
157 def LOAD8_S_I64 : I<(outs I64:$dst), (ins i32imm:$off, I32:$addr,
159 "i64.load8_s\t$dst, ${off}(${addr})${p2align}">;
160 def LOAD8_U_I64 : I<(outs I64:$dst), (ins i32imm:$off, I32:$addr,
162 "i64.load8_u\t$dst, ${off}(${addr})${p2align}">;
163 def LOAD16_S_I64 : I<(outs I64:$dst), (ins i32imm:$off, I32:$addr,
165 "i64.load16_s\t$dst, ${off}(${addr})${p2align}">;
166 def LOAD16_U_I64 : I<(outs I64:$dst), (ins i32imm:$off, I32:$addr,
168 "i64.load16_u\t$dst, ${off}(${addr})${p2align}">;
169 def LOAD32_S_I64 : I<(outs I64:$dst), (ins i32imm:$off, I32:$addr,
171 "i64.load32_s\t$dst, ${off}(${addr})${p2align}">;
172 def LOAD32_U_I64 : I<(outs I64:$dst), (ins i32imm:$off, I32:$addr,
174 "i64.load32_u\t$dst, ${off}(${addr})${p2align}">;
191 def : Pat<(i32 (sextloadi8 (regPlusImm I32:$addr, imm:$off))),
192 (LOAD8_S_I32 imm:$off, $addr, 0)>;
193 def : Pat<(i32 (zextloadi8 (regPlusImm I32:$addr, imm:$off))),
194 (LOAD8_U_I32 imm:$off, $addr, 0)>;
195 def : Pat<(i32 (sextloadi16 (regPlusImm I32:$addr, imm:$off))),
196 (LOAD16_S_I32 imm:$off, $addr, 0)>;
197 def : Pat<(i32 (zextloadi16 (regPlusImm I32:$addr, imm:$off))),
198 (LOAD16_U_I32 imm:$off, $addr, 0)>;
199 def : Pat<(i64 (sextloadi8 (regPlusImm I32:$addr, imm:$off))),
200 (LOAD8_S_I64 imm:$off, $addr, 0)>;
201 def : Pat<(i64 (zextloadi8 (regPlusImm I32:$addr, imm:$off))),
202 (LOAD8_U_I64 imm:$off, $addr, 0)>;
203 def : Pat<(i64 (sextloadi16 (regPlusImm I32:$addr, imm:$off))),
204 (LOAD16_S_I64 imm:$off, $addr, 0)>;
205 def : Pat<(i64 (zextloadi16 (regPlusImm I32:$addr, imm:$off))),
206 (LOAD16_U_I64 imm:$off, $addr, 0)>;
207 def : Pat<(i64 (sextloadi32 (regPlusImm I32:$addr, imm:$off))),
208 (LOAD32_S_I64 imm:$off, $addr, 0)>;
209 def : Pat<(i64 (zextloadi32 (regPlusImm I32:$addr, imm:$off))),
210 (LOAD32_U_I64 imm:$off, $addr, 0)>;
211 def : Pat<(i32 (sextloadi8 (or_is_add I32:$addr, imm:$off))),
212 (LOAD8_S_I32 imm:$off, $addr, 0)>;
213 def : Pat<(i32 (zextloadi8 (or_is_add I32:$addr, imm:$off))),
214 (LOAD8_U_I32 imm:$off, $addr, 0)>;
215 def : Pat<(i32 (sextloadi16 (or_is_add I32:$addr, imm:$off))),
216 (LOAD16_S_I32 imm:$off, $addr, 0)>;
217 def : Pat<(i32 (zextloadi16 (or_is_add I32:$addr, imm:$off))),
218 (LOAD16_U_I32 imm:$off, $addr, 0)>;
219 def : Pat<(i64 (sextloadi8 (or_is_add I32:$addr, imm:$off))),
220 (LOAD8_S_I64 imm:$off, $addr, 0)>;
221 def : Pat<(i64 (zextloadi8 (or_is_add I32:$addr, imm:$off))),
222 (LOAD8_U_I64 imm:$off, $addr, 0)>;
223 def : Pat<(i64 (sextloadi16 (or_is_add I32:$addr, imm:$off))),
224 (LOAD16_S_I64 imm:$off, $addr, 0)>;
225 def : Pat<(i64 (zextloadi16 (or_is_add I32:$addr, imm:$off))),
226 (LOAD16_U_I64 imm:$off, $addr, 0)>;
227 def : Pat<(i64 (sextloadi32 (or_is_add I32:$addr, imm:$off))),
228 (LOAD32_S_I64 imm:$off, $addr, 0)>;
229 def : Pat<(i64 (zextloadi32 (or_is_add I32:$addr, imm:$off))),
230 (LOAD32_U_I64 imm:$off, $addr, 0)>;
232 (WebAssemblywrapper tglobaladdr:$off)))),
233 (LOAD8_S_I32 tglobaladdr:$off, $addr, 0)>;
235 (WebAssemblywrapper tglobaladdr:$off)))),
236 (LOAD8_U_I32 tglobaladdr:$off, $addr, 0)>;
238 (WebAssemblywrapper tglobaladdr:$off)))),
239 (LOAD16_S_I32 tglobaladdr:$off, $addr, 0)>;
241 (WebAssemblywrapper tglobaladdr:$off)))),
242 (LOAD16_U_I32 tglobaladdr:$off, $addr, 0)>;
244 (WebAssemblywrapper tglobaladdr:$off)))),
245 (LOAD8_S_I64 tglobaladdr:$off, $addr, 0)>;
247 (WebAssemblywrapper tglobaladdr:$off)))),
248 (LOAD8_U_I64 tglobaladdr:$off, $addr, 0)>;
250 (WebAssemblywrapper tglobaladdr:$off)))),
251 (LOAD16_S_I64 tglobaladdr:$off, $addr, 0)>;
253 (WebAssemblywrapper tglobaladdr:$off)))),
254 (LOAD16_U_I64 tglobaladdr:$off, $addr, 0)>;
256 (WebAssemblywrapper tglobaladdr:$off)))),
257 (LOAD32_S_I64 tglobaladdr:$off, $addr, 0)>;
259 (WebAssemblywrapper tglobaladdr:$off)))),
260 (LOAD32_U_I64 tglobaladdr:$off, $addr, 0)>;
262 (WebAssemblywrapper texternalsym:$off)))),
263 (LOAD8_S_I32 texternalsym:$off, $addr, 0)>;
265 (WebAssemblywrapper texternalsym:$off)))),
266 (LOAD8_U_I32 texternalsym:$off, $addr, 0)>;
268 (WebAssemblywrapper texternalsym:$off)))),
269 (LOAD16_S_I32 texternalsym:$off, $addr, 0)>;
271 (WebAssemblywrapper texternalsym:$off)))),
272 (LOAD16_U_I32 texternalsym:$off, $addr, 0)>;
274 (WebAssemblywrapper texternalsym:$off)))),
275 (LOAD8_S_I64 texternalsym:$off, $addr, 0)>;
277 (WebAssemblywrapper texternalsym:$off)))),
278 (LOAD8_U_I64 texternalsym:$off, $addr, 0)>;
280 (WebAssemblywrapper texternalsym:$off)))),
281 (LOAD16_S_I64 texternalsym:$off, $addr, 0)>;
283 (WebAssemblywrapper texternalsym:$off)))),
284 (LOAD16_U_I64 texternalsym:$off, $addr, 0)>;
286 (WebAssemblywrapper texternalsym:$off)))),
287 (LOAD32_S_I64 texternalsym:$off, $addr, 0)>;
289 (WebAssemblywrapper texternalsym:$off)))),
290 (LOAD32_U_I64 texternalsym:$off, $addr, 0)>;
293 def : Pat<(i32 (sextloadi8 imm:$off)),
294 (LOAD8_S_I32 imm:$off, (CONST_I32 0), 0)>;
295 def : Pat<(i32 (zextloadi8 imm:$off)),
296 (LOAD8_U_I32 imm:$off, (CONST_I32 0), 0)>;
297 def : Pat<(i32 (sextloadi16 imm:$off)),
298 (LOAD16_S_I32 imm:$off, (CONST_I32 0), 0)>;
299 def : Pat<(i32 (zextloadi16 imm:$off)),
300 (LOAD16_U_I32 imm:$off, (CONST_I32 0), 0)>;
301 def : Pat<(i64 (sextloadi8 imm:$off)),
302 (LOAD8_S_I64 imm:$off, (CONST_I32 0), 0)>;
303 def : Pat<(i64 (zextloadi8 imm:$off)),
304 (LOAD8_U_I64 imm:$off, (CONST_I32 0), 0)>;
305 def : Pat<(i64 (sextloadi16 imm:$off)),
306 (LOAD16_S_I64 imm:$off, (CONST_I32 0), 0)>;
307 def : Pat<(i64 (zextloadi16 imm:$off)),
308 (LOAD16_U_I64 imm:$off, (CONST_I32 0), 0)>;
309 def : Pat<(i64 (sextloadi32 imm:$off)),
310 (LOAD32_S_I64 imm:$off, (CONST_I32 0), 0)>;
311 def : Pat<(i64 (zextloadi32 imm:$off)),
312 (LOAD32_U_I64 imm:$off, (CONST_I32 0), 0)>;
313 def : Pat<(i32 (sextloadi8 (WebAssemblywrapper tglobaladdr:$off))),
314 (LOAD8_S_I32 tglobaladdr:$off, (CONST_I32 0), 0)>;
315 def : Pat<(i32 (zextloadi8 (WebAssemblywrapper tglobaladdr:$off))),
316 (LOAD8_U_I32 tglobaladdr:$off, (CONST_I32 0), 0)>;
317 def : Pat<(i32 (sextloadi16 (WebAssemblywrapper tglobaladdr:$off))),
318 (LOAD16_S_I32 tglobaladdr:$off, (CONST_I32 0), 0)>;
319 def : Pat<(i32 (zextloadi16 (WebAssemblywrapper tglobaladdr:$off))),
320 (LOAD16_U_I32 tglobaladdr:$off, (CONST_I32 0), 0)>;
321 def : Pat<(i64 (sextloadi8 (WebAssemblywrapper tglobaladdr:$off))),
322 (LOAD8_S_I64 tglobaladdr:$off, (CONST_I32 0), 0)>;
323 def : Pat<(i64 (zextloadi8 (WebAssemblywrapper tglobaladdr:$off))),
324 (LOAD8_U_I64 tglobaladdr:$off, (CONST_I32 0), 0)>;
325 def : Pat<(i64 (sextloadi16 (WebAssemblywrapper tglobaladdr:$off))),
326 (LOAD16_S_I64 tglobaladdr:$off, (CONST_I32 0), 0)>;
327 def : Pat<(i64 (zextloadi16 (WebAssemblywrapper tglobaladdr:$off))),
328 (LOAD16_U_I64 tglobaladdr:$off, (CONST_I32 0), 0)>;
329 def : Pat<(i64 (sextloadi32 (WebAssemblywrapper tglobaladdr:$off))),
330 (LOAD32_S_I64 tglobaladdr:$off, (CONST_I32 0), 0)>;
331 def : Pat<(i64 (zextloadi32 (WebAssemblywrapper tglobaladdr:$off))),
332 (LOAD32_U_I64 tglobaladdr:$off, (CONST_I32 0), 0)>;
333 def : Pat<(i32 (sextloadi8 (WebAssemblywrapper texternalsym:$off))),
334 (LOAD8_S_I32 texternalsym:$off, (CONST_I32 0), 0)>;
335 def : Pat<(i32 (zextloadi8 (WebAssemblywrapper texternalsym:$off))),
336 (LOAD8_U_I32 texternalsym:$off, (CONST_I32 0), 0)>;
337 def : Pat<(i32 (sextloadi16 (WebAssemblywrapper texternalsym:$off))),
338 (LOAD16_S_I32 texternalsym:$off, (CONST_I32 0), 0)>;
339 def : Pat<(i32 (zextloadi16 (WebAssemblywrapper texternalsym:$off))),
340 (LOAD16_U_I32 texternalsym:$off, (CONST_I32 0), 0)>;
341 def : Pat<(i64 (sextloadi8 (WebAssemblywrapper texternalsym:$off))),
342 (LOAD8_S_I64 texternalsym:$off, (CONST_I32 0), 0)>;
343 def : Pat<(i64 (zextloadi8 (WebAssemblywrapper texternalsym:$off))),
344 (LOAD8_U_I64 texternalsym:$off, (CONST_I32 0), 0)>;
345 def : Pat<(i64 (sextloadi16 (WebAssemblywrapper texternalsym:$off))),
346 (LOAD16_S_I64 texternalsym:$off, (CONST_I32 0), 0)>;
347 def : Pat<(i64 (zextloadi16 (WebAssemblywrapper texternalsym:$off))),
348 (LOAD16_U_I64 texternalsym:$off, (CONST_I32 0), 0)>;
349 def : Pat<(i64 (sextloadi32 (WebAssemblywrapper texternalsym:$off))),
350 (LOAD32_S_I64 texternalsym:$off, (CONST_I32 0), 0)>;
351 def : Pat<(i64 (zextloadi32 (WebAssemblywrapper texternalsym:$off))),
352 (LOAD32_U_I64 texternalsym:$off, (CONST_I32 0), 0)>;
365 def : Pat<(i32 (extloadi8 (regPlusImm I32:$addr, imm:$off))),
366 (LOAD8_U_I32 imm:$off, $addr, 0)>;
367 def : Pat<(i32 (extloadi16 (regPlusImm I32:$addr, imm:$off))),
368 (LOAD16_U_I32 imm:$off, $addr, 0)>;
369 def : Pat<(i64 (extloadi8 (regPlusImm I32:$addr, imm:$off))),
370 (LOAD8_U_I64 imm:$off, $addr, 0)>;
371 def : Pat<(i64 (extloadi16 (regPlusImm I32:$addr, imm:$off))),
372 (LOAD16_U_I64 imm:$off, $addr, 0)>;
373 def : Pat<(i64 (extloadi32 (regPlusImm I32:$addr, imm:$off))),
374 (LOAD32_U_I64 imm:$off, $addr, 0)>;
375 def : Pat<(i32 (extloadi8 (or_is_add I32:$addr, imm:$off))),
376 (LOAD8_U_I32 imm:$off, $addr, 0)>;
377 def : Pat<(i32 (extloadi16 (or_is_add I32:$addr, imm:$off))),
378 (LOAD16_U_I32 imm:$off, $addr, 0)>;
379 def : Pat<(i64 (extloadi8 (or_is_add I32:$addr, imm:$off))),
380 (LOAD8_U_I64 imm:$off, $addr, 0)>;
381 def : Pat<(i64 (extloadi16 (or_is_add I32:$addr, imm:$off))),
382 (LOAD16_U_I64 imm:$off, $addr, 0)>;
383 def : Pat<(i64 (extloadi32 (or_is_add I32:$addr, imm:$off))),
384 (LOAD32_U_I64 imm:$off, $addr, 0)>;
386 (WebAssemblywrapper tglobaladdr:$off)))),
387 (LOAD8_U_I32 tglobaladdr:$off, $addr, 0)>;
389 (WebAssemblywrapper tglobaladdr:$off)))),
390 (LOAD16_U_I32 tglobaladdr:$off, $addr, 0)>;
392 (WebAssemblywrapper tglobaladdr:$off)))),
393 (LOAD8_U_I64 tglobaladdr:$off, $addr, 0)>;
395 (WebAssemblywrapper tglobaladdr:$off)))),
396 (LOAD16_U_I64 tglobaladdr:$off, $addr, 0)>;
398 (WebAssemblywrapper tglobaladdr:$off)))),
399 (LOAD32_U_I64 tglobaladdr:$off, $addr, 0)>;
401 (WebAssemblywrapper texternalsym:$off)))),
402 (LOAD8_U_I32 texternalsym:$off, $addr, 0)>;
404 (WebAssemblywrapper texternalsym:$off)))),
405 (LOAD16_U_I32 texternalsym:$off, $addr, 0)>;
407 (WebAssemblywrapper texternalsym:$off)))),
408 (LOAD8_U_I64 texternalsym:$off, $addr, 0)>;
410 (WebAssemblywrapper texternalsym:$off)))),
411 (LOAD16_U_I64 texternalsym:$off, $addr, 0)>;
413 (WebAssemblywrapper texternalsym:$off)))),
414 (LOAD32_U_I64 texternalsym:$off, $addr, 0)>;
417 def : Pat<(i32 (extloadi8 imm:$off)),
418 (LOAD8_U_I32 imm:$off, (CONST_I32 0), 0)>;
419 def : Pat<(i32 (extloadi16 imm:$off)),
420 (LOAD16_U_I32 imm:$off, (CONST_I32 0), 0)>;
421 def : Pat<(i64 (extloadi8 imm:$off)),
422 (LOAD8_U_I64 imm:$off, (CONST_I32 0), 0)>;
423 def : Pat<(i64 (extloadi16 imm:$off)),
424 (LOAD16_U_I64 imm:$off, (CONST_I32 0), 0)>;
425 def : Pat<(i64 (extloadi32 imm:$off)),
426 (LOAD32_U_I64 imm:$off, (CONST_I32 0), 0)>;
427 def : Pat<(i32 (extloadi8 (WebAssemblywrapper tglobaladdr:$off))),
428 (LOAD8_U_I32 tglobaladdr:$off, (CONST_I32 0), 0)>;
429 def : Pat<(i32 (extloadi16 (WebAssemblywrapper tglobaladdr:$off))),
430 (LOAD16_U_I32 tglobaladdr:$off, (CONST_I32 0), 0)>;
431 def : Pat<(i64 (extloadi8 (WebAssemblywrapper tglobaladdr:$off))),
432 (LOAD8_U_I64 tglobaladdr:$off, (CONST_I32 0), 0)>;
433 def : Pat<(i64 (extloadi16 (WebAssemblywrapper tglobaladdr:$off))),
434 (LOAD16_U_I64 tglobaladdr:$off, (CONST_I32 0), 0)>;
435 def : Pat<(i64 (extloadi32 (WebAssemblywrapper tglobaladdr:$off))),
436 (LOAD32_U_I64 tglobaladdr:$off, (CONST_I32 0), 0)>;
437 def : Pat<(i32 (extloadi8 (WebAssemblywrapper texternalsym:$off))),
438 (LOAD8_U_I32 texternalsym:$off, (CONST_I32 0), 0)>;
439 def : Pat<(i32 (extloadi16 (WebAssemblywrapper texternalsym:$off))),
440 (LOAD16_U_I32 texternalsym:$off, (CONST_I32 0), 0)>;
441 def : Pat<(i64 (extloadi8 (WebAssemblywrapper texternalsym:$off))),
442 (LOAD8_U_I64 texternalsym:$off, (CONST_I32 0), 0)>;
443 def : Pat<(i64 (extloadi16 (WebAssemblywrapper texternalsym:$off))),
444 (LOAD16_U_I64 texternalsym:$off, (CONST_I32 0), 0)>;
445 def : Pat<(i64 (extloadi32 (WebAssemblywrapper texternalsym:$off))),
446 (LOAD32_U_I64 tglobaladdr:$off, (CONST_I32 0), 0)>;
456 def STORE_I32 : I<(outs I32:$dst), (ins i32imm:$off, I32:$addr,
458 "i32.store\t$dst, ${off}(${addr})${p2align}, $val">;
459 def STORE_I64 : I<(outs I64:$dst), (ins i32imm:$off, I32:$addr,
461 "i64.store\t$dst, ${off}(${addr})${p2align}, $val">;
462 def STORE_F32 : I<(outs F32:$dst), (ins i32imm:$off, I32:$addr,
464 "f32.store\t$dst, ${off}(${addr})${p2align}, $val">;
465 def STORE_F64 : I<(outs F64:$dst), (ins i32imm:$off, I32:$addr,
467 "f64.store\t$dst, ${off}(${addr})${p2align}, $val">;
478 def : Pat<(store I32:$val, (regPlusImm I32:$addr, imm:$off)),
479 (STORE_I32 imm:$off, I32:$addr, 0, I32:$val)>;
480 def : Pat<(store I64:$val, (regPlusImm I32:$addr, imm:$off)),
481 (STORE_I64 imm:$off, I32:$addr, 0, I64:$val)>;
482 def : Pat<(store F32:$val, (regPlusImm I32:$addr, imm:$off)),
483 (STORE_F32 imm:$off, I32:$addr, 0, F32:$val)>;
484 def : Pat<(store F64:$val, (regPlusImm I32:$addr, imm:$off)),
485 (STORE_F64 imm:$off, I32:$addr, 0, F64:$val)>;
486 def : Pat<(store I32:$val, (or_is_add I32:$addr, imm:$off)),
487 (STORE_I32 imm:$off, I32:$addr, 0, I32:$val)>;
488 def : Pat<(store I64:$val, (or_is_add I32:$addr, imm:$off)),
489 (STORE_I64 imm:$off, I32:$addr, 0, I64:$val)>;
490 def : Pat<(store F32:$val, (or_is_add I32:$addr, imm:$off)),
491 (STORE_F32 imm:$off, I32:$addr, 0, F32:$val)>;
492 def : Pat<(store F64:$val, (or_is_add I32:$addr, imm:$off)),
493 (STORE_F64 imm:$off, I32:$addr, 0, F64:$val)>;
495 (WebAssemblywrapper tglobaladdr:$off))),
496 (STORE_I32 tglobaladdr:$off, I32:$addr, 0, I32:$val)>;
498 (WebAssemblywrapper tglobaladdr:$off))),
499 (STORE_I64 tglobaladdr:$off, I32:$addr, 0, I64:$val)>;
501 (WebAssemblywrapper tglobaladdr:$off))),
502 (STORE_F32 tglobaladdr:$off, I32:$addr, 0, F32:$val)>;
504 (WebAssemblywrapper tglobaladdr:$off))),
505 (STORE_F64 tglobaladdr:$off, I32:$addr, 0, F64:$val)>;
507 (WebAssemblywrapper texternalsym:$off))),
508 (STORE_I32 texternalsym:$off, I32:$addr, 0, I32:$val)>;
510 (WebAssemblywrapper texternalsym:$off))),
511 (STORE_I64 texternalsym:$off, I32:$addr, 0, I64:$val)>;
513 (WebAssemblywrapper texternalsym:$off))),
514 (STORE_F32 texternalsym:$off, I32:$addr, 0, F32:$val)>;
516 (WebAssemblywrapper texternalsym:$off))),
517 (STORE_F64 texternalsym:$off, I32:$addr, 0, F64:$val)>;
520 def : Pat<(store I32:$val, imm:$off),
521 (STORE_I32 imm:$off, (CONST_I32 0), 0, I32:$val)>;
522 def : Pat<(store I64:$val, imm:$off),
523 (STORE_I64 imm:$off, (CONST_I32 0), 0, I64:$val)>;
524 def : Pat<(store F32:$val, imm:$off),
525 (STORE_F32 imm:$off, (CONST_I32 0), 0, F32:$val)>;
526 def : Pat<(store F64:$val, imm:$off),
527 (STORE_F64 imm:$off, (CONST_I32 0), 0, F64:$val)>;
528 def : Pat<(store I32:$val, (WebAssemblywrapper tglobaladdr:$off)),
529 (STORE_I32 tglobaladdr:$off, (CONST_I32 0), 0, I32:$val)>;
530 def : Pat<(store I64:$val, (WebAssemblywrapper tglobaladdr:$off)),
531 (STORE_I64 tglobaladdr:$off, (CONST_I32 0), 0, I64:$val)>;
532 def : Pat<(store F32:$val, (WebAssemblywrapper tglobaladdr:$off)),
533 (STORE_F32 tglobaladdr:$off, (CONST_I32 0), 0, F32:$val)>;
534 def : Pat<(store F64:$val, (WebAssemblywrapper tglobaladdr:$off)),
535 (STORE_F64 tglobaladdr:$off, (CONST_I32 0), 0, F64:$val)>;
536 def : Pat<(store I32:$val, (WebAssemblywrapper texternalsym:$off)),
537 (STORE_I32 texternalsym:$off, (CONST_I32 0), 0, I32:$val)>;
538 def : Pat<(store I64:$val, (WebAssemblywrapper texternalsym:$off)),
539 (STORE_I64 texternalsym:$off, (CONST_I32 0), 0, I64:$val)>;
540 def : Pat<(store F32:$val, (WebAssemblywrapper texternalsym:$off)),
541 (STORE_F32 texternalsym:$off, (CONST_I32 0), 0, F32:$val)>;
542 def : Pat<(store F64:$val, (WebAssemblywrapper texternalsym:$off)),
543 (STORE_F64 texternalsym:$off, (CONST_I32 0), 0, F64:$val)>;
548 def STORE8_I32 : I<(outs I32:$dst), (ins i32imm:$off, I32:$addr,
550 "i32.store8\t$dst, ${off}(${addr})${p2align}, $val">;
551 def STORE16_I32 : I<(outs I32:$dst), (ins i32imm:$off, I32:$addr,
553 "i32.store16\t$dst, ${off}(${addr})${p2align}, $val">;
554 def STORE8_I64 : I<(outs I64:$dst), (ins i32imm:$off, I32:$addr,
556 "i64.store8\t$dst, ${off}(${addr})${p2align}, $val">;
557 def STORE16_I64 : I<(outs I64:$dst), (ins i32imm:$off, I32:$addr,
559 "i64.store16\t$dst, ${off}(${addr})${p2align}, $val">;
560 def STORE32_I64 : I<(outs I64:$dst), (ins i32imm:$off, I32:$addr,
562 "i64.store32\t$dst, ${off}(${addr})${p2align}, $val">;
579 def : Pat<(truncstorei8 I32:$val, (regPlusImm I32:$addr, imm:$off)),
580 (STORE8_I32 imm:$off, I32:$addr, 0, I32:$val)>;
581 def : Pat<(truncstorei16 I32:$val, (regPlusImm I32:$addr, imm:$off)),
582 (STORE16_I32 imm:$off, I32:$addr, 0, I32:$val)>;
583 def : Pat<(truncstorei8 I64:$val, (regPlusImm I32:$addr, imm:$off)),
584 (STORE8_I64 imm:$off, I32:$addr, 0, I64:$val)>;
585 def : Pat<(truncstorei16 I64:$val, (regPlusImm I32:$addr, imm:$off)),
586 (STORE16_I64 imm:$off, I32:$addr, 0, I64:$val)>;
587 def : Pat<(truncstorei32 I64:$val, (regPlusImm I32:$addr, imm:$off)),
588 (STORE32_I64 imm:$off, I32:$addr, 0, I64:$val)>;
589 def : Pat<(truncstorei8 I32:$val, (or_is_add I32:$addr, imm:$off)),
590 (STORE8_I32 imm:$off, I32:$addr, 0, I32:$val)>;
591 def : Pat<(truncstorei16 I32:$val, (or_is_add I32:$addr, imm:$off)),
592 (STORE16_I32 imm:$off, I32:$addr, 0, I32:$val)>;
593 def : Pat<(truncstorei8 I64:$val, (or_is_add I32:$addr, imm:$off)),
594 (STORE8_I64 imm:$off, I32:$addr, 0, I64:$val)>;
595 def : Pat<(truncstorei16 I64:$val, (or_is_add I32:$addr, imm:$off)),
596 (STORE16_I64 imm:$off, I32:$addr, 0, I64:$val)>;
597 def : Pat<(truncstorei32 I64:$val, (or_is_add I32:$addr, imm:$off)),
598 (STORE32_I64 imm:$off, I32:$addr, 0, I64:$val)>;
601 (WebAssemblywrapper tglobaladdr:$off))),
602 (STORE8_I32 tglobaladdr:$off, I32:$addr, 0, I32:$val)>;
605 (WebAssemblywrapper tglobaladdr:$off))),
606 (STORE16_I32 tglobaladdr:$off, I32:$addr, 0, I32:$val)>;
609 (WebAssemblywrapper tglobaladdr:$off))),
610 (STORE8_I64 tglobaladdr:$off, I32:$addr, 0, I64:$val)>;
613 (WebAssemblywrapper tglobaladdr:$off))),
614 (STORE16_I64 tglobaladdr:$off, I32:$addr, 0, I64:$val)>;
617 (WebAssemblywrapper tglobaladdr:$off))),
618 (STORE32_I64 tglobaladdr:$off, I32:$addr, 0, I64:$val)>;
620 (WebAssemblywrapper texternalsym:$off))),
621 (STORE8_I32 texternalsym:$off, I32:$addr, 0, I32:$val)>;
624 (WebAssemblywrapper texternalsym:$off))),
625 (STORE16_I32 texternalsym:$off, I32:$addr, 0, I32:$val)>;
628 (WebAssemblywrapper texternalsym:$off))),
629 (STORE8_I64 texternalsym:$off, I32:$addr, 0, I64:$val)>;
632 (WebAssemblywrapper texternalsym:$off))),
633 (STORE16_I64 texternalsym:$off, I32:$addr, 0, I64:$val)>;
636 (WebAssemblywrapper texternalsym:$off))),
637 (STORE32_I64 texternalsym:$off, I32:$addr, 0, I64:$val)>;
640 def : Pat<(truncstorei8 I32:$val, imm:$off),
641 (STORE8_I32 imm:$off, (CONST_I32 0), 0, I32:$val)>;
642 def : Pat<(truncstorei16 I32:$val, imm:$off),
643 (STORE16_I32 imm:$off, (CONST_I32 0), 0, I32:$val)>;
644 def : Pat<(truncstorei8 I64:$val, imm:$off),
645 (STORE8_I64 imm:$off, (CONST_I32 0), 0, I64:$val)>;
646 def : Pat<(truncstorei16 I64:$val, imm:$off),
647 (STORE16_I64 imm:$off, (CONST_I32 0), 0, I64:$val)>;
648 def : Pat<(truncstorei32 I64:$val, imm:$off),
649 (STORE32_I64 imm:$off, (CONST_I32 0), 0, I64:$val)>;
650 def : Pat<(truncstorei8 I32:$val, (WebAssemblywrapper tglobaladdr:$off)),
651 (STORE8_I32 tglobaladdr:$off, (CONST_I32 0), 0, I32:$val)>;
652 def : Pat<(truncstorei16 I32:$val, (WebAssemblywrapper tglobaladdr:$off)),
653 (STORE16_I32 tglobaladdr:$off, (CONST_I32 0), 0, I32:$val)>;
654 def : Pat<(truncstorei8 I64:$val, (WebAssemblywrapper tglobaladdr:$off)),
655 (STORE8_I64 tglobaladdr:$off, (CONST_I32 0), 0, I64:$val)>;
656 def : Pat<(truncstorei16 I64:$val, (WebAssemblywrapper tglobaladdr:$off)),
657 (STORE16_I64 tglobaladdr:$off, (CONST_I32 0), 0, I64:$val)>;
658 def : Pat<(truncstorei32 I64:$val, (WebAssemblywrapper tglobaladdr:$off)),
659 (STORE32_I64 tglobaladdr:$off, (CONST_I32 0), 0, I64:$val)>;
660 def : Pat<(truncstorei8 I32:$val, (WebAssemblywrapper texternalsym:$off)),
661 (STORE8_I32 texternalsym:$off, (CONST_I32 0), 0, I32:$val)>;
662 def : Pat<(truncstorei16 I32:$val, (WebAssemblywrapper texternalsym:$off)),
663 (STORE16_I32 texternalsym:$off, (CONST_I32 0), 0, I32:$val)>;
664 def : Pat<(truncstorei8 I64:$val, (WebAssemblywrapper texternalsym:$off)),
665 (STORE8_I64 texternalsym:$off, (CONST_I32 0), 0, I64:$val)>;
666 def : Pat<(truncstorei16 I64:$val, (WebAssemblywrapper texternalsym:$off)),
667 (STORE16_I64 texternalsym:$off, (CONST_I32 0), 0, I64:$val)>;
668 def : Pat<(truncstorei32 I64:$val, (WebAssemblywrapper texternalsym:$off)),
669 (STORE32_I64 texternalsym:$off, (CONST_I32 0), 0, I64:$val)>;