diff options
| author | Alex Bradbury <asb@lowrisc.org> | 2018-04-12 05:36:44 +0000 |
|---|---|---|
| committer | Alex Bradbury <asb@lowrisc.org> | 2018-04-12 05:36:44 +0000 |
| commit | 8f296478ebbc17daeff51f9d1b84880af5bb726f (patch) | |
| tree | d8aa05e004de0a47bbc5b83f3c8c7cca85067fbd /llvm/test/CodeGen/RISCV/double-arith.ll | |
| parent | 0b4175f160a274d02fa556edcc1ccab02a2f01b6 (diff) | |
| download | bcm5719-llvm-8f296478ebbc17daeff51f9d1b84880af5bb726f.tar.gz bcm5719-llvm-8f296478ebbc17daeff51f9d1b84880af5bb726f.zip | |
[RISCV] Add tests missed in r329871
llvm-svn: 329872
Diffstat (limited to 'llvm/test/CodeGen/RISCV/double-arith.ll')
| -rw-r--r-- | llvm/test/CodeGen/RISCV/double-arith.ll | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/RISCV/double-arith.ll b/llvm/test/CodeGen/RISCV/double-arith.ll new file mode 100644 index 00000000000..d0e4d786a2f --- /dev/null +++ b/llvm/test/CodeGen/RISCV/double-arith.ll @@ -0,0 +1,23 @@ +; 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 +} |

