Skip to content

Commit

Permalink
[RISCV] Add rv32i/rv64i command lines to some floating point tests. NFC
Browse files Browse the repository at this point in the history
This improves our coverage of soft float libcalls lowering.

Remove most of the test cases from rv64i-single-softfloat.ll. They
were duplicated in the test files that now test softflow. Only
a couple test cases for constrained FP remain. Those should be
removed when we start supporting constrained FP.

This is follow up from D113528.
  • Loading branch information
topperc committed Nov 11, 2021
1 parent 94a901a commit eb44f3f
Show file tree
Hide file tree
Showing 15 changed files with 9,032 additions and 1,138 deletions.
875 changes: 875 additions & 0 deletions llvm/test/CodeGen/RISCV/double-arith.ll

Large diffs are not rendered by default.

902 changes: 902 additions & 0 deletions llvm/test/CodeGen/RISCV/double-convert.ll

Large diffs are not rendered by default.

376 changes: 376 additions & 0 deletions llvm/test/CodeGen/RISCV/double-fcmp.ll

Large diffs are not rendered by default.

551 changes: 551 additions & 0 deletions llvm/test/CodeGen/RISCV/double-intrinsics.ll

Large diffs are not rendered by default.

766 changes: 766 additions & 0 deletions llvm/test/CodeGen/RISCV/float-arith.ll

Large diffs are not rendered by default.

808 changes: 806 additions & 2 deletions llvm/test/CodeGen/RISCV/float-convert.ll

Large diffs are not rendered by default.

360 changes: 360 additions & 0 deletions llvm/test/CodeGen/RISCV/float-fcmp.ll

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions llvm/test/CodeGen/RISCV/float-frem.ll
Expand Up @@ -3,6 +3,10 @@
; RUN: | FileCheck -check-prefix=RV32IF %s
; RUN: llc -mtriple=riscv64 -mattr=+f -verify-machineinstrs < %s \
; RUN: | FileCheck -check-prefix=RV64IF %s
; RUN: llc -mtriple=riscv32 -verify-machineinstrs < %s \
; RUN: | FileCheck -check-prefix=RV32I %s
; RUN: llc -mtriple=riscv64 -verify-machineinstrs < %s \
; RUN: | FileCheck -check-prefix=RV64I %s

define float @frem_f32(float %a, float %b) nounwind {
; RV32IF-LABEL: frem_f32:
Expand All @@ -22,6 +26,24 @@ define float @frem_f32(float %a, float %b) nounwind {
; RV64IF-NEXT: ld ra, 8(sp) # 8-byte Folded Reload
; RV64IF-NEXT: addi sp, sp, 16
; RV64IF-NEXT: ret
;
; RV32I-LABEL: frem_f32:
; RV32I: # %bb.0:
; RV32I-NEXT: addi sp, sp, -16
; RV32I-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
; RV32I-NEXT: call fmodf@plt
; RV32I-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
; RV32I-NEXT: addi sp, sp, 16
; RV32I-NEXT: ret
;
; RV64I-LABEL: frem_f32:
; RV64I: # %bb.0:
; RV64I-NEXT: addi sp, sp, -16
; RV64I-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
; RV64I-NEXT: call fmodf@plt
; RV64I-NEXT: ld ra, 8(sp) # 8-byte Folded Reload
; RV64I-NEXT: addi sp, sp, 16
; RV64I-NEXT: ret
%1 = frem float %a, %b
ret float %1
}

0 comments on commit eb44f3f

Please sign in to comment.