1 ; 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 ; RUN: llc -mtriple=riscv64 -mattr=+d -verify-machineinstrs < %s \
5 ; RUN: | FileCheck -check-prefix=RV64IFD %s
7 define double @frem_f64(double %a, double %b) nounwind {
8 ; RV32IFD-LABEL: frem_f64:
10 ; RV32IFD-NEXT: addi sp, sp, -16
11 ; RV32IFD-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
12 ; RV32IFD-NEXT: call fmod@plt
13 ; RV32IFD-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
14 ; RV32IFD-NEXT: addi sp, sp, 16
17 ; RV64IFD-LABEL: frem_f64:
19 ; RV64IFD-NEXT: addi sp, sp, -16
20 ; RV64IFD-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
21 ; RV64IFD-NEXT: call fmod@plt
22 ; RV64IFD-NEXT: ld ra, 8(sp) # 8-byte Folded Reload
23 ; RV64IFD-NEXT: addi sp, sp, 16
25 %1 = frem double %a, %b