1 ; RUN: llc -march=mipsel < %s | FileCheck %s -check-prefix=32
2 ; RUN: llc -march=mips64el -mcpu=mips4 < %s | FileCheck %s -check-prefix=64
3 ; RUN: llc -march=mips64el -mcpu=mips64 < %s | FileCheck %s -check-prefix=64
5 @gint_ = external global i32
6 @gLL_ = external global i64
8 ; 32-LABEL: store_int_float_:
9 ; 32: trunc.w.s $f[[R0:[0-9]+]], $f{{[0-9]+}}
12 define void @store_int_float_(float %a) {
14 %conv = fptosi float %a to i32
15 store i32 %conv, i32* @gint_, align 4
19 ; 32-LABEL: store_int_double_:
20 ; 32: trunc.w.d $f[[R0:[0-9]+]], $f{{[0-9]+}}
22 ; 64-LABEL: store_int_double_:
23 ; 64: trunc.w.d $f[[R0:[0-9]+]], $f{{[0-9]+}}
26 define void @store_int_double_(double %a) {
28 %conv = fptosi double %a to i32
29 store i32 %conv, i32* @gint_, align 4
33 ; 64-LABEL: store_LL_float_:
34 ; 64: trunc.l.s $f[[R0:[0-9]+]], $f{{[0-9]+}}
37 define void @store_LL_float_(float %a) {
39 %conv = fptosi float %a to i64
40 store i64 %conv, i64* @gLL_, align 8
44 ; 64-LABEL: store_LL_double_:
45 ; 64: trunc.l.d $f[[R0:[0-9]+]], $f{{[0-9]+}}
48 define void @store_LL_double_(double %a) {
50 %conv = fptosi double %a to i64
51 store i64 %conv, i64* @gLL_, align 8