• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc -march=mipsel < %s | FileCheck %s -check-prefix=FP32 -check-prefix=CHECK
2; RUN: llc -march=mips  < %s | FileCheck %s -check-prefix=FP32 -check-prefix=CHECK
3; RUN: llc -march=mipsel -mcpu=mips32r2 -mattr=+fp64 < %s | FileCheck %s -check-prefix=FP64 -check-prefix=CHECK
4; RUN: llc -march=mips -mcpu=mips32r2 -mattr=+fp64 < %s | FileCheck %s -check-prefix=FP64 -check-prefix=CHECK
5
6@a = external global i32
7
8; CHECK-LABEL: f:
9; FP32: mtc1
10; FP32: mtc1
11; FP64-DAG: mtc1
12; FP64-DAG: mthc1
13
14define double @f(i32 %a1, double %d) nounwind {
15entry:
16  store i32 %a1, i32* @a, align 4
17  %add = fadd double %d, 2.000000e+00
18  ret double %add
19}
20
21; CHECK-LABEL: f3:
22; FP32: mfc1
23; FP32: mfc1
24; FP64-DAG: mfc1
25; FP64-DAG: mfhc1
26
27define void @f3(double %d, i32 %a1) nounwind {
28entry:
29  tail call void @f2(i32 %a1, double %d) nounwind
30  ret void
31}
32
33declare void @f2(i32, double)
34
35