[PATCH] D125962: [RISCV] Add a test showing overlapping stack offsets with RVV

Yueh-Ting (eop) Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 24 17:38:19 PDT 2022


eopXD added a comment.

> Hi. The test is arbitrary and is storing s9/$x25 just to have something storing to a scalar stack slot to exercise the frame lowering; it's not a real callee spill.
> Since $x25 is a copy of a0/$x10, eventually the machine copy propagation pass removes the copy and that's why it becomes a store of a0.
> We could update the tests to use a callee-saved register for readability, but this isn't a correctness issue.

Thank you for the reply. I think I am getting closer to understanding the whole thing.

So after the machine copy propagation, the code looks like the following.
s9/$x25 contains value (so we need to callee-save it) and a0/$x10 is a spill-slot object (so we need to callee save it too along with $v30) as well, right?

  $x25 = COPY $x10
  SW renamable $x10, %stack.0, 0 :: (store (s32) into %stack.0)
  PseudoVSPILL_M2 renamable $v30m2, %stack.1 :: (store unknown-size into %stack.1, align 8)
  PseudoRET


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D125962/new/

https://reviews.llvm.org/D125962



More information about the llvm-commits mailing list