[all-commits] [llvm/llvm-project] b8cd66: [NFC][RISCV] Add test for scalable offset under la...

Kai Wang via All-commits all-commits at lists.llvm.org
Wed Apr 7 23:47:06 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b8cd6681156a533dd6d4b3f0f5a1acf1116bc347
      https://github.com/llvm/llvm-project/commit/b8cd6681156a533dd6d4b3f0f5a1acf1116bc347
  Author: Hsiangkai Wang <kai.wang at sifive.com>
  Date:   2021-04-08 (Thu, 08 Apr 2021)

  Changed paths:
    A llvm/test/CodeGen/RISCV/rvv/addi-scalable-offset.mir

  Log Message:
  -----------
  [NFC][RISCV] Add test for scalable offset under large stack size.

This test case shows that we access wrong stack slots when the frame
object has scalable offset under large stack size.

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


  Commit: ba72bdef3250ce2ef602d7a07af6a5a6c5255fde
      https://github.com/llvm/llvm-project/commit/ba72bdef3250ce2ef602d7a07af6a5a6c5255fde
  Author: Hsiangkai Wang <kai.wang at sifive.com>
  Date:   2021-04-08 (Thu, 08 Apr 2021)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVRegisterInfo.cpp
    M llvm/test/CodeGen/RISCV/rvv/addi-scalable-offset.mir

  Log Message:
  -----------
  [RISCV] Add scalable offset under very large stack size.

If the stack size is larger than 12 bits, we have to use a scratch
register to store the stack size. Before we introduce the scalable stack
offset, we could simplify

%0 = ADDI %stack.0, 0

=>

%scratch = ... # sequence of instructions to move the offset into
%%scratch
%0 = ADD %fp, %scratch

However, if the offset contains scalable part, we need to consider it.

%0 = ADDI %stack.0, 0

=>

%scratch = ... # sequence of instructions to move the offset into
%%scratch
%scratch = ADD %fp, %scratch
%scalable_offset = ... # sequence of instructions for vscaled-offset.
%0 = ADD/SUB %scratch, %scalable_offset

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


Compare: https://github.com/llvm/llvm-project/compare/fe16aa7d6551...ba72bdef3250


More information about the All-commits mailing list