xref: /aosp_15_r20/external/llvm/test/CodeGen/Mips/mips64-libcall.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc -march=mips64el -mcpu=mips64r2 -O3 < %s |\
2*9880d681SAndroid Build Coastguard Worker; RUN: FileCheck %s -check-prefix=HARD
3*9880d681SAndroid Build Coastguard Worker; RUN: llc -march=mips64el -mcpu=mips64r2 -mattr=+soft-float < %s |\
4*9880d681SAndroid Build Coastguard Worker; RUN: FileCheck %s -check-prefix=SOFT
5*9880d681SAndroid Build Coastguard Worker
6*9880d681SAndroid Build Coastguard Worker; Check that %add is not passed in an integer register.
7*9880d681SAndroid Build Coastguard Worker;
8*9880d681SAndroid Build Coastguard Worker; HARD-LABEL: callfloor:
9*9880d681SAndroid Build Coastguard Worker; HARD-NOT: dmfc1 $4
10*9880d681SAndroid Build Coastguard Worker
11*9880d681SAndroid Build Coastguard Workerdefine double @callfloor(double %d) nounwind readnone {
12*9880d681SAndroid Build Coastguard Workerentry:
13*9880d681SAndroid Build Coastguard Worker  %add = fadd double %d, 1.000000e+00
14*9880d681SAndroid Build Coastguard Worker  %call = tail call double @floor(double %add) nounwind readnone
15*9880d681SAndroid Build Coastguard Worker  ret double %call
16*9880d681SAndroid Build Coastguard Worker}
17*9880d681SAndroid Build Coastguard Worker
18*9880d681SAndroid Build Coastguard Workerdeclare double @floor(double) nounwind readnone
19*9880d681SAndroid Build Coastguard Worker
20*9880d681SAndroid Build Coastguard Worker; Check call16.
21*9880d681SAndroid Build Coastguard Worker;
22*9880d681SAndroid Build Coastguard Worker; SOFT-LABEL: f64add:
23*9880d681SAndroid Build Coastguard Worker; SOFT: ld $25, %call16(__adddf3)
24*9880d681SAndroid Build Coastguard Worker
25*9880d681SAndroid Build Coastguard Workerdefine double @f64add(double %a, double %b) {
26*9880d681SAndroid Build Coastguard Workerentry:
27*9880d681SAndroid Build Coastguard Worker  %add = fadd double %a, %b
28*9880d681SAndroid Build Coastguard Worker  ret double %add
29*9880d681SAndroid Build Coastguard Worker}
30