2015-09-01 06:24:11 +08:00
|
|
|
; RUN: llc < %s -asm-verbose=false | FileCheck %s
|
|
|
|
|
|
|
|
; Test that basic stores are assembled properly.
|
|
|
|
|
2015-09-10 04:54:31 +08:00
|
|
|
target datalayout = "e-p:32:32-i64:64-n32:64-S128"
|
2015-09-01 06:24:11 +08:00
|
|
|
target triple = "wasm32-unknown-unknown"
|
|
|
|
|
2015-10-06 08:27:55 +08:00
|
|
|
; CHECK-LABEL: sti32:
|
2015-11-24 00:50:18 +08:00
|
|
|
; CHECK-NEXT: .param i32, i32{{$}}
|
2015-12-05 08:26:39 +08:00
|
|
|
; CHECK-NEXT: i32.store $discard=, 0($0), $1{{$}}
|
2015-10-06 08:27:55 +08:00
|
|
|
; CHECK-NEXT: return{{$}}
|
2015-09-01 06:24:11 +08:00
|
|
|
define void @sti32(i32 *%p, i32 %v) {
|
|
|
|
store i32 %v, i32* %p
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2015-10-06 08:27:55 +08:00
|
|
|
; CHECK-LABEL: sti64:
|
2015-11-24 00:50:18 +08:00
|
|
|
; CHECK-NEXT: .param i32, i64{{$}}
|
2015-12-05 08:26:39 +08:00
|
|
|
; CHECK-NEXT: i64.store $discard=, 0($0), $1{{$}}
|
2015-10-06 08:27:55 +08:00
|
|
|
; CHECK-NEXT: return{{$}}
|
2015-09-01 06:24:11 +08:00
|
|
|
define void @sti64(i64 *%p, i64 %v) {
|
|
|
|
store i64 %v, i64* %p
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2015-10-06 08:27:55 +08:00
|
|
|
; CHECK-LABEL: stf32:
|
2015-11-24 00:50:18 +08:00
|
|
|
; CHECK-NEXT: .param i32, f32{{$}}
|
2015-12-05 08:26:39 +08:00
|
|
|
; CHECK-NEXT: f32.store $discard=, 0($0), $1{{$}}
|
2015-10-06 08:27:55 +08:00
|
|
|
; CHECK-NEXT: return{{$}}
|
2015-09-01 06:24:11 +08:00
|
|
|
define void @stf32(float *%p, float %v) {
|
|
|
|
store float %v, float* %p
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2015-10-06 08:27:55 +08:00
|
|
|
; CHECK-LABEL: stf64:
|
2015-11-24 00:50:18 +08:00
|
|
|
; CHECK-NEXT: .param i32, f64{{$}}
|
2015-12-05 08:26:39 +08:00
|
|
|
; CHECK-NEXT: f64.store $discard=, 0($0), $1{{$}}
|
2015-10-06 08:27:55 +08:00
|
|
|
; CHECK-NEXT: return{{$}}
|
2015-09-01 06:24:11 +08:00
|
|
|
define void @stf64(double *%p, double %v) {
|
|
|
|
store double %v, double* %p
|
|
|
|
ret void
|
|
|
|
}
|