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