[all-commits] [llvm/llvm-project] ab1bd2: [RISCV] Permit larger RVV stacks and stack offsets

Fraser Cormack via All-commits all-commits at lists.llvm.org
Thu Jun 24 23:26:13 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ab1bd255939e23117706d79698b93f933fb114f4
      https://github.com/llvm/llvm-project/commit/ab1bd255939e23117706d79698b93f933fb114f4
  Author: Fraser Cormack <fraser at codeplay.com>
  Date:   2021-06-25 (Fri, 25 Jun 2021)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
    A llvm/test/CodeGen/RISCV/rvv/large-rvv-stack-size.mir

  Log Message:
  -----------
  [RISCV] Permit larger RVV stacks and stack offsets

This patch teaches the compiler to generate code to handle larger RVV
stack sizes and stack offsets which resolve an amount larger than 2047
vector registers in size.

The previous behaviour was asserting on such large values as it was only
able to materialize the constant by feeding it to the 12-bit immediate
of an `ADDI` instruction. The compiler can now materialize this amount
into a temporary register before continuing with the computation.

A test case for this scenario is included which also checks that the
temporary register used to materialize the amount doesn't require an
additional spill slot over what we're already reserving for RVV code.

Reviewed By: rogfer01

Differential Revision: https://reviews.llvm.org/D104727




More information about the All-commits mailing list