blob: 7d80d2cc8e037d96a935cac0d4f87cecf3199332 [file] [log] [blame]
Alex Bradbury8f296472018-04-12 05:36:44 +00001; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2; RUN: llc -mtriple=riscv32 -mattr=+d -verify-machineinstrs < %s \
3; RUN: | FileCheck -check-prefix=RV32IFD %s
4
5declare double @llvm.floor.f64(double)
6
7; The call to ffloor is introduced very late, meaning this test case covers
8; aspects of passing f64 on RV32D soft-float that double-calling-conv.ll
9; doesn't.
10
11define double @foo(double %a) nounwind {
12; RV32IFD-LABEL: foo:
13; RV32IFD: # %bb.0:
14; RV32IFD-NEXT: addi sp, sp, -16
15; RV32IFD-NEXT: sw ra, 12(sp)
Shiva Chend58bd8d2018-04-25 14:19:12 +000016; RV32IFD-NEXT: call floor
Alex Bradbury8f296472018-04-12 05:36:44 +000017; RV32IFD-NEXT: lw ra, 12(sp)
18; RV32IFD-NEXT: addi sp, sp, 16
19; RV32IFD-NEXT: ret
20 %1 = call double @llvm.floor.f64(double %a)
21 ret double %1
22}