1 ; RUN: llc -march=mipsel < %s | FileCheck %s -check-prefix=NO-MFHC1 -check-prefix=ALL 2 ; RUN: llc -march=mips < %s | FileCheck %s -check-prefix=NO-MFHC1 -check-prefix=ALL 3 ; RUN: llc -march=mipsel -mcpu=mips32r2 < %s | FileCheck %s -check-prefix=HAS-MFHC1 -check-prefix=ALL 4 ; RUN: llc -march=mips -mcpu=mips32r2 < %s | FileCheck %s -check-prefix=HAS-MFHC1 -check-prefix=ALL 5 ; RUN: llc -march=mipsel -mcpu=mips32r2 -mattr=+fp64 < %s | FileCheck %s -check-prefix=HAS-MFHC1 -check-prefix=ALL 6 ; RUN: llc -march=mips -mcpu=mips32r2 -mattr=+fp64 < %s | FileCheck %s -check-prefix=HAS-MFHC1 -check-prefix=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 18 define double @f(i32 %a1, double %d) nounwind { 19 entry: 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 33 define void @f3(double %d, i32 %a1) nounwind { 34 entry: 35 tail call void @f2(i32 %a1, double %d) nounwind 36 ret void 37 } 38 39 declare void @f2(i32, double) 40 41