• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc -march=mipsel -relocation-model=pic -O0 -fast-isel-abort=1 -mcpu=mips32r2 \
2; RUN:     < %s | FileCheck %s
3; RUN: llc -march=mipsel -relocation-model=pic -O0 -fast-isel-abort=1 -mcpu=mips32 \
4; 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
17  %0 = load float, float* @f, align 4
18  %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
29  %0 = load double, double* @d, align 8
30  %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}
36