• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc -march=mipsel < %s | FileCheck %s -check-prefix=32
2; RUN: llc -march=mips64el -mcpu=mips64 < %s | FileCheck %s -check-prefix=64
3
4@gint_ = external global i32
5@gLL_ = external global i64
6
7; 32-LABEL: store_int_float_:
8; 32: trunc.w.s $f[[R0:[0-9]+]], $f{{[0-9]+}}
9; 32: swc1 $f[[R0]],
10
11define void @store_int_float_(float %a) {
12entry:
13  %conv = fptosi float %a to i32
14  store i32 %conv, i32* @gint_, align 4
15  ret void
16}
17
18; 32-LABEL: store_int_double_:
19; 32: trunc.w.d $f[[R0:[0-9]+]], $f{{[0-9]+}}
20; 32: swc1 $f[[R0]],
21; 64-LABEL: store_int_double_:
22; 64: trunc.w.d $f[[R0:[0-9]+]], $f{{[0-9]+}}
23; 64: swc1 $f[[R0]],
24
25define void @store_int_double_(double %a) {
26entry:
27  %conv = fptosi double %a to i32
28  store i32 %conv, i32* @gint_, align 4
29  ret void
30}
31
32; 64-LABEL: store_LL_float_:
33; 64: trunc.l.s $f[[R0:[0-9]+]], $f{{[0-9]+}}
34; 64: sdc1 $f[[R0]],
35
36define void @store_LL_float_(float %a) {
37entry:
38  %conv = fptosi float %a to i64
39  store i64 %conv, i64* @gLL_, align 8
40  ret void
41}
42
43; 64-LABEL: store_LL_double_:
44; 64: trunc.l.d $f[[R0:[0-9]+]], $f{{[0-9]+}}
45; 64: sdc1 $f[[R0]],
46
47define void @store_LL_double_(double %a) {
48entry:
49  %conv = fptosi double %a to i64
50  store i64 %conv, i64* @gLL_, align 8
51  ret void
52}
53