1 ; RUN: llc < %s -asm-verbose=false | FileCheck %s
3 ; Test that truncating stores are assembled properly.
5 target datalayout = "e-p:32:32-i64:64-v128:8:128-n32:64-S128"
6 target triple = "wasm32-unknown-unknown"
8 ; CHECK-LABEL: (func $trunc_i8_i32
9 ; CHECK: (store_i8 @1 @0)
10 define void @trunc_i8_i32(i8 *%p, i32 %v) {
11 %t = trunc i32 %v to i8
16 ; CHECK-LABEL: (func $trunc_i16_i32
17 ; CHECK: (store_i16 @1 @0)
18 define void @trunc_i16_i32(i16 *%p, i32 %v) {
19 %t = trunc i32 %v to i16
24 ; CHECK-LABEL: (func $trunc_i8_i64
25 ; CHECK: (store_i8 @1 @0)
26 define void @trunc_i8_i64(i8 *%p, i64 %v) {
27 %t = trunc i64 %v to i8
32 ; CHECK-LABEL: (func $trunc_i16_i64
33 ; CHECK: (store_i16 @1 @0)
34 define void @trunc_i16_i64(i16 *%p, i64 %v) {
35 %t = trunc i64 %v to i16
40 ; CHECK-LABEL: (func $trunc_i32_i64
41 ; CHECK: (store_i32 @1 @0)
42 define void @trunc_i32_i64(i32 *%p, i64 %v) {
43 %t = trunc i64 %v to i32