blob: 7c0e5b2bbfdce19f0a056c0c05d767671ae888f1 [file] [log] [blame]
Akira Hatanaka02b0e482013-02-22 21:10:03 +00001; RUN: llc -march=mips64el -mcpu=mips64r2 -O3 < %s |\
2; RUN: FileCheck %s -check-prefix=HARD
Eric Christopher81fa35c2015-05-08 00:57:22 +00003; RUN: llc -march=mips64el -mcpu=mips64r2 -mattr=+soft-float < %s |\
Akira Hatanaka02b0e482013-02-22 21:10:03 +00004; RUN: FileCheck %s -check-prefix=SOFT
5
6; Check that %add is not passed in an integer register.
7;
Stephen Lind24ab202013-07-14 06:24:09 +00008; HARD-LABEL: callfloor:
Akira Hatanaka02b0e482013-02-22 21:10:03 +00009; HARD-NOT: dmfc1 $4
10
11define double @callfloor(double %d) nounwind readnone {
12entry:
13 %add = fadd double %d, 1.000000e+00
14 %call = tail call double @floor(double %add) nounwind readnone
15 ret double %call
16}
17
18declare double @floor(double) nounwind readnone
19
20; Check call16.
21;
Stephen Lind24ab202013-07-14 06:24:09 +000022; SOFT-LABEL: f64add:
Simon Dardisca74dd72017-01-27 11:36:52 +000023; SOFT: jal __adddf3
Akira Hatanaka02b0e482013-02-22 21:10:03 +000024
25define double @f64add(double %a, double %b) {
26entry:
27 %add = fadd double %a, %b
28 ret double %add
29}