forked from OSchip/llvm-project
24 lines
773 B
LLVM
24 lines
773 B
LLVM
|
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
||
|
; RUN: llc -mtriple=riscv32 -mattr=+d -verify-machineinstrs < %s \
|
||
|
; RUN: | FileCheck -check-prefix=RV32IFD %s
|
||
|
|
||
|
define double @fadd_d(double %a, double %b) nounwind {
|
||
|
; RV32IFD-LABEL: fadd_d:
|
||
|
; RV32IFD: # %bb.0:
|
||
|
; RV32IFD-NEXT: addi sp, sp, -16
|
||
|
; RV32IFD-NEXT: sw a2, 8(sp)
|
||
|
; RV32IFD-NEXT: sw a3, 12(sp)
|
||
|
; RV32IFD-NEXT: fld ft0, 8(sp)
|
||
|
; RV32IFD-NEXT: sw a0, 8(sp)
|
||
|
; RV32IFD-NEXT: sw a1, 12(sp)
|
||
|
; RV32IFD-NEXT: fld ft1, 8(sp)
|
||
|
; RV32IFD-NEXT: fadd.d ft0, ft1, ft0
|
||
|
; RV32IFD-NEXT: fsd ft0, 8(sp)
|
||
|
; RV32IFD-NEXT: lw a0, 8(sp)
|
||
|
; RV32IFD-NEXT: lw a1, 12(sp)
|
||
|
; RV32IFD-NEXT: addi sp, sp, 16
|
||
|
; RV32IFD-NEXT: ret
|
||
|
%1 = fadd double %a, %b
|
||
|
ret double %1
|
||
|
}
|