Skip to content

Commit

Permalink
[RISCV] Use v8-v23 as argument registers to conform to the proposal.
Browse files Browse the repository at this point in the history
The maximum LMUL is 8. We need 16 vector registers for two LMUL-8
arguments. The modification follows the proposal of psABI in
riscv-non-isa/riscv-elf-psabi-doc#171

Differential Revision: https://reviews.llvm.org/D95134
  • Loading branch information
Hsiangkai authored and memfrob committed Oct 4, 2022
1 parent 6a63836 commit 3990954
Show file tree
Hide file tree
Showing 461 changed files with 105,891 additions and 71,513 deletions.
17 changes: 9 additions & 8 deletions llvm/lib/Target/RISCV/RISCVISelLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2565,14 +2565,15 @@ static const MCPhysReg ArgFPR64s[] = {
};
// This is an interim calling convention and it may be changed in the future.
static const MCPhysReg ArgVRs[] = {
RISCV::V16, RISCV::V17, RISCV::V18, RISCV::V19, RISCV::V20,
RISCV::V21, RISCV::V22, RISCV::V23
};
static const MCPhysReg ArgVRM2s[] = {
RISCV::V16M2, RISCV::V18M2, RISCV::V20M2, RISCV::V22M2
};
static const MCPhysReg ArgVRM4s[] = {RISCV::V16M4, RISCV::V20M4};
static const MCPhysReg ArgVRM8s[] = {RISCV::V16M8};
RISCV::V8, RISCV::V9, RISCV::V10, RISCV::V11, RISCV::V12, RISCV::V13,
RISCV::V14, RISCV::V15, RISCV::V16, RISCV::V17, RISCV::V18, RISCV::V19,
RISCV::V20, RISCV::V21, RISCV::V22, RISCV::V23};
static const MCPhysReg ArgVRM2s[] = {RISCV::V8M2, RISCV::V10M2, RISCV::V12M2,
RISCV::V14M2, RISCV::V16M2, RISCV::V18M2,
RISCV::V20M2, RISCV::V22M2};
static const MCPhysReg ArgVRM4s[] = {RISCV::V8M4, RISCV::V12M4, RISCV::V16M4,
RISCV::V20M4};
static const MCPhysReg ArgVRM8s[] = {RISCV::V8M8, RISCV::V16M8};

// Pass a 2*XLEN argument that has been split into two XLEN values through
// registers or the stack as necessary.
Expand Down
132 changes: 66 additions & 66 deletions llvm/test/CodeGen/RISCV/rvv/mask-exts-truncs-rv32.ll

Large diffs are not rendered by default.

132 changes: 66 additions & 66 deletions llvm/test/CodeGen/RISCV/rvv/mask-exts-truncs-rv64.ll

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions llvm/test/CodeGen/RISCV/rvv/saddo-sdnode.ll
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ define <vscale x 2 x i32> @saddo_nvx2i32(<vscale x 2 x i32> %x, <vscale x 2 x i3
; CHECK-LABEL: saddo_nvx2i32:
; CHECK: # %bb.0:
; CHECK-NEXT: vsetvli a0, zero, e32,m1,ta,mu
; CHECK-NEXT: vmslt.vx v25, v17, zero
; CHECK-NEXT: vadd.vv v26, v16, v17
; CHECK-NEXT: vmslt.vv v27, v26, v16
; CHECK-NEXT: vmslt.vx v25, v9, zero
; CHECK-NEXT: vadd.vv v26, v8, v9
; CHECK-NEXT: vmslt.vv v27, v26, v8
; CHECK-NEXT: vsetvli a0, zero, e8,mf4,ta,mu
; CHECK-NEXT: vmxor.mm v0, v25, v27
; CHECK-NEXT: vsetvli a0, zero, e32,m1,ta,mu
; CHECK-NEXT: vmerge.vim v16, v26, 0, v0
; CHECK-NEXT: vmerge.vim v8, v26, 0, v0
; CHECK-NEXT: ret
%a = call { <vscale x 2 x i32>, <vscale x 2 x i1> } @llvm.sadd.with.overflow.nxv2i32(<vscale x 2 x i32> %x, <vscale x 2 x i32> %y)
%b = extractvalue { <vscale x 2 x i32>, <vscale x 2 x i1> } %a, 0
Expand Down
580 changes: 276 additions & 304 deletions llvm/test/CodeGen/RISCV/rvv/setcc-fp-rv32.ll

Large diffs are not rendered by default.

580 changes: 276 additions & 304 deletions llvm/test/CodeGen/RISCV/rvv/setcc-fp-rv64.ll

Large diffs are not rendered by default.

640 changes: 315 additions & 325 deletions llvm/test/CodeGen/RISCV/rvv/setcc-integer-rv32.ll

Large diffs are not rendered by default.

544 changes: 267 additions & 277 deletions llvm/test/CodeGen/RISCV/rvv/setcc-integer-rv64.ll

Large diffs are not rendered by default.

583 changes: 367 additions & 216 deletions llvm/test/CodeGen/RISCV/rvv/vaadd-rv32.ll

Large diffs are not rendered by default.

713 changes: 449 additions & 264 deletions llvm/test/CodeGen/RISCV/rvv/vaadd-rv64.ll

Large diffs are not rendered by default.

583 changes: 367 additions & 216 deletions llvm/test/CodeGen/RISCV/rvv/vaaddu-rv32.ll

Large diffs are not rendered by default.

713 changes: 449 additions & 264 deletions llvm/test/CodeGen/RISCV/rvv/vaaddu-rv64.ll

Large diffs are not rendered by default.

433 changes: 271 additions & 162 deletions llvm/test/CodeGen/RISCV/rvv/vadc-rv32.ll

Large diffs are not rendered by default.

529 changes: 331 additions & 198 deletions llvm/test/CodeGen/RISCV/rvv/vadc-rv64.ll

Large diffs are not rendered by default.

871 changes: 547 additions & 324 deletions llvm/test/CodeGen/RISCV/rvv/vadd-rv32.ll

Large diffs are not rendered by default.

1,065 changes: 669 additions & 396 deletions llvm/test/CodeGen/RISCV/rvv/vadd-rv64.ll

Large diffs are not rendered by default.

148 changes: 74 additions & 74 deletions llvm/test/CodeGen/RISCV/rvv/vadd-sdnode-rv32.ll

Large diffs are not rendered by default.

132 changes: 66 additions & 66 deletions llvm/test/CodeGen/RISCV/rvv/vadd-sdnode-rv64.ll

Large diffs are not rendered by default.

144 changes: 66 additions & 78 deletions llvm/test/CodeGen/RISCV/rvv/vamoadd-rv32.ll

Large diffs are not rendered by default.

344 changes: 156 additions & 188 deletions llvm/test/CodeGen/RISCV/rvv/vamoadd-rv64.ll

Large diffs are not rendered by default.

144 changes: 66 additions & 78 deletions llvm/test/CodeGen/RISCV/rvv/vamoand-rv32.ll

Large diffs are not rendered by default.

344 changes: 156 additions & 188 deletions llvm/test/CodeGen/RISCV/rvv/vamoand-rv64.ll

Large diffs are not rendered by default.

144 changes: 66 additions & 78 deletions llvm/test/CodeGen/RISCV/rvv/vamomax-rv32.ll

Large diffs are not rendered by default.

344 changes: 156 additions & 188 deletions llvm/test/CodeGen/RISCV/rvv/vamomax-rv64.ll

Large diffs are not rendered by default.

144 changes: 66 additions & 78 deletions llvm/test/CodeGen/RISCV/rvv/vamomaxu-rv32.ll

Large diffs are not rendered by default.

344 changes: 156 additions & 188 deletions llvm/test/CodeGen/RISCV/rvv/vamomaxu-rv64.ll

Large diffs are not rendered by default.

144 changes: 66 additions & 78 deletions llvm/test/CodeGen/RISCV/rvv/vamomin-rv32.ll

Large diffs are not rendered by default.

344 changes: 156 additions & 188 deletions llvm/test/CodeGen/RISCV/rvv/vamomin-rv64.ll

Large diffs are not rendered by default.

144 changes: 66 additions & 78 deletions llvm/test/CodeGen/RISCV/rvv/vamominu-rv32.ll

Large diffs are not rendered by default.

344 changes: 156 additions & 188 deletions llvm/test/CodeGen/RISCV/rvv/vamominu-rv64.ll

Large diffs are not rendered by default.

144 changes: 66 additions & 78 deletions llvm/test/CodeGen/RISCV/rvv/vamoor-rv32.ll

Large diffs are not rendered by default.

344 changes: 156 additions & 188 deletions llvm/test/CodeGen/RISCV/rvv/vamoor-rv64.ll

Large diffs are not rendered by default.

408 changes: 186 additions & 222 deletions llvm/test/CodeGen/RISCV/rvv/vamoswap-rv32.ll

Large diffs are not rendered by default.

688 changes: 312 additions & 376 deletions llvm/test/CodeGen/RISCV/rvv/vamoswap-rv64.ll

Large diffs are not rendered by default.

144 changes: 66 additions & 78 deletions llvm/test/CodeGen/RISCV/rvv/vamoxor-rv32.ll

Large diffs are not rendered by default.

344 changes: 156 additions & 188 deletions llvm/test/CodeGen/RISCV/rvv/vamoxor-rv64.ll

Large diffs are not rendered by default.

871 changes: 547 additions & 324 deletions llvm/test/CodeGen/RISCV/rvv/vand-rv32.ll

Large diffs are not rendered by default.

1,065 changes: 669 additions & 396 deletions llvm/test/CodeGen/RISCV/rvv/vand-rv64.ll

Large diffs are not rendered by default.

246 changes: 121 additions & 125 deletions llvm/test/CodeGen/RISCV/rvv/vand-sdnode-rv32.ll

Large diffs are not rendered by default.

232 changes: 114 additions & 118 deletions llvm/test/CodeGen/RISCV/rvv/vand-sdnode-rv64.ll

Large diffs are not rendered by default.

583 changes: 367 additions & 216 deletions llvm/test/CodeGen/RISCV/rvv/vasub-rv32.ll

Large diffs are not rendered by default.

713 changes: 449 additions & 264 deletions llvm/test/CodeGen/RISCV/rvv/vasub-rv64.ll

Large diffs are not rendered by default.

583 changes: 367 additions & 216 deletions llvm/test/CodeGen/RISCV/rvv/vasubu-rv32.ll

Large diffs are not rendered by default.

713 changes: 449 additions & 264 deletions llvm/test/CodeGen/RISCV/rvv/vasubu-rv64.ll

Large diffs are not rendered by default.

94 changes: 41 additions & 53 deletions llvm/test/CodeGen/RISCV/rvv/vcompress-rv32.ll

Large diffs are not rendered by default.

106 changes: 46 additions & 60 deletions llvm/test/CodeGen/RISCV/rvv/vcompress-rv64.ll

Large diffs are not rendered by default.

583 changes: 367 additions & 216 deletions llvm/test/CodeGen/RISCV/rvv/vdiv-rv32.ll

Large diffs are not rendered by default.

713 changes: 449 additions & 264 deletions llvm/test/CodeGen/RISCV/rvv/vdiv-rv64.ll

Large diffs are not rendered by default.

160 changes: 78 additions & 82 deletions llvm/test/CodeGen/RISCV/rvv/vdiv-sdnode-rv32.ll

Large diffs are not rendered by default.

144 changes: 70 additions & 74 deletions llvm/test/CodeGen/RISCV/rvv/vdiv-sdnode-rv64.ll

Large diffs are not rendered by default.

583 changes: 367 additions & 216 deletions llvm/test/CodeGen/RISCV/rvv/vdivu-rv32.ll

Large diffs are not rendered by default.

713 changes: 449 additions & 264 deletions llvm/test/CodeGen/RISCV/rvv/vdivu-rv64.ll

Large diffs are not rendered by default.

160 changes: 78 additions & 82 deletions llvm/test/CodeGen/RISCV/rvv/vdivu-sdnode-rv32.ll

Large diffs are not rendered by default.

144 changes: 70 additions & 74 deletions llvm/test/CodeGen/RISCV/rvv/vdivu-sdnode-rv64.ll

Large diffs are not rendered by default.

Loading

0 comments on commit 3990954

Please sign in to comment.