1 ; RUN: llc < %s -asm-verbose=false -disable-wasm-fallthrough-return-opt -wasm-keep-registers | FileCheck %s
2 ; RUN: llc < %s -asm-verbose=false -disable-wasm-fallthrough-return-opt -wasm-keep-registers -fast-isel -fast-isel-abort=1 | FileCheck %s
4 ; Test that basic stores are assembled properly.
6 target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128"
7 target triple = "wasm32-unknown-unknown"
10 ; CHECK-NEXT: .functype sti32 (i32, i32) -> (){{$}}
11 ; CHECK-NEXT: local.get $push[[L0:[0-9]+]]=, 0{{$}}
12 ; CHECK-NEXT: local.get $push[[L1:[0-9]+]]=, 1{{$}}
13 ; CHECK-NEXT: i32.store 0($pop[[L0]]), $pop[[L1]]{{$}}
14 ; CHECK-NEXT: return{{$}}
15 define void @sti32(i32 *%p, i32 %v) {
21 ; CHECK-NEXT: .functype sti64 (i32, i64) -> (){{$}}
22 ; CHECK-NEXT: local.get $push[[L0:[0-9]+]]=, 0{{$}}
23 ; CHECK-NEXT: local.get $push[[L1:[0-9]+]]=, 1{{$}}
24 ; CHECK-NEXT: i64.store 0($pop[[L0]]), $pop[[L1]]{{$}}
25 ; CHECK-NEXT: return{{$}}
26 define void @sti64(i64 *%p, i64 %v) {
32 ; CHECK-NEXT: .functype stf32 (i32, f32) -> (){{$}}
33 ; CHECK-NEXT: local.get $push[[L0:[0-9]+]]=, 0{{$}}
34 ; CHECK-NEXT: local.get $push[[L1:[0-9]+]]=, 1{{$}}
35 ; CHECK-NEXT: f32.store 0($pop[[L0]]), $pop[[L1]]{{$}}
36 ; CHECK-NEXT: return{{$}}
37 define void @stf32(float *%p, float %v) {
38 store float %v, float* %p
43 ; CHECK-NEXT: .functype stf64 (i32, f64) -> (){{$}}
44 ; CHECK-NEXT: local.get $push[[L0:[0-9]+]]=, 0{{$}}
45 ; CHECK-NEXT: local.get $push[[L1:[0-9]+]]=, 1{{$}}
46 ; CHECK-NEXT: f64.store 0($pop[[L0]]), $pop[[L1]]{{$}}
47 ; CHECK-NEXT: return{{$}}
48 define void @stf64(double *%p, double %v) {
49 store double %v, double* %p