• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc < %s -asm-verbose=false | FileCheck %s
2
3; Test that basic stores are assembled properly.
4
5target datalayout = "e-p:32:32-i64:64-n32:64-S128"
6target triple = "wasm32-unknown-unknown"
7
8; CHECK-LABEL: sti32:
9; CHECK-NEXT: .param i32, i32{{$}}
10; CHECK-NEXT: i32.store $discard=, 0($0), $1{{$}}
11; CHECK-NEXT: return{{$}}
12define void @sti32(i32 *%p, i32 %v) {
13  store i32 %v, i32* %p
14  ret void
15}
16
17; CHECK-LABEL: sti64:
18; CHECK-NEXT: .param i32, i64{{$}}
19; CHECK-NEXT: i64.store $discard=, 0($0), $1{{$}}
20; CHECK-NEXT: return{{$}}
21define void @sti64(i64 *%p, i64 %v) {
22  store i64 %v, i64* %p
23  ret void
24}
25
26; CHECK-LABEL: stf32:
27; CHECK-NEXT: .param i32, f32{{$}}
28; CHECK-NEXT: f32.store $discard=, 0($0), $1{{$}}
29; CHECK-NEXT: return{{$}}
30define void @stf32(float *%p, float %v) {
31  store float %v, float* %p
32  ret void
33}
34
35; CHECK-LABEL: stf64:
36; CHECK-NEXT: .param i32, f64{{$}}
37; CHECK-NEXT: f64.store $discard=, 0($0), $1{{$}}
38; CHECK-NEXT: return{{$}}
39define void @stf64(double *%p, double %v) {
40  store double %v, double* %p
41  ret void
42}
43