blob: 9a9570f21b3aa43693c7cd51d360a4cd63afc624 [file] [log] [blame]
Daniel Sanderscbaca422016-07-29 12:27:28 +00001; RUN: llc -march=mipsel -relocation-model=pic -O0 -fast-isel-abort=3 -mcpu=mips32r2 \
Reed Kotler12f94882014-10-10 17:00:46 +00002; RUN: < %s | FileCheck %s
Daniel Sanderscbaca422016-07-29 12:27:28 +00003; RUN: llc -march=mipsel -relocation-model=pic -O0 -fast-isel-abort=3 -mcpu=mips32 \
Reed Kotler12f94882014-10-10 17:00:46 +00004; RUN: < %s | FileCheck %s
5
6
7@f = global float 0x40D6E83280000000, align 4
8@d = global double 0x4132D68780000000, align 8
9@i_f = common global i32 0, align 4
10@i_d = common global i32 0, align 4
11@.str = private unnamed_addr constant [5 x i8] c"%i \0A\00", align 1
12
13; Function Attrs: nounwind
14define void @ifv() {
15entry:
16; CHECK-LABEL: .ent ifv
David Blaikiea79ac142015-02-27 21:17:42 +000017 %0 = load float, float* @f, align 4
Reed Kotler12f94882014-10-10 17:00:46 +000018 %conv = fptosi float %0 to i32
19; CHECK: trunc.w.s $f[[REG:[0-9]+]], $f{{[0-9]+}}
20; CHECK: mfc1 ${{[0-9]+}}, $f[[REG]]
21 store i32 %conv, i32* @i_f, align 4
22 ret void
23}
24
25; Function Attrs: nounwind
26define void @idv() {
27entry:
28; CHECK-LABEL: .ent idv
David Blaikiea79ac142015-02-27 21:17:42 +000029 %0 = load double, double* @d, align 8
Reed Kotler12f94882014-10-10 17:00:46 +000030 %conv = fptosi double %0 to i32
31; CHECK: trunc.w.d $f[[REG:[0-9]+]], $f{{[0-9]+}}
32; CHECK: mfc1 ${{[0-9]+}}, $f[[REG]]
33 store i32 %conv, i32* @i_d, align 4
34 ret void
35}