[PATCH] D61884: [RISCV] Support stack offset exceed 32-bit for RV64
Shiva Chen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 11 07:11:38 PDT 2019
shiva0217 marked 2 inline comments as done.
shiva0217 added inline comments.
================
Comment at: lib/Target/RISCV/RISCVFrameLowering.cpp:88
+ } else {
+ TII->movImm64(MBB, MBBI, DL, ScratchReg, Val, Flag);
+ }
----------------
lenary wrote:
> I think you can probably get rid of `movImm32`, and only use movImm64 (the logic in `generateInstSeq` covers 32-bit operands), which I think will address the TODO in `movImm32`.
>
> Then my only worry would be how we error when we need a larger-than-32-bit offset on RISC-V 32, which would probably cause errors somewhere way before this code anyway.
Yes, there's some test case improvement by replacing movImm32 with the generateInstSeq one, thanks!
I would add an error message for RV32 with a larger-than-32-bit offset. We could update the message when we support a larger-than-32-bit offset in RV32.
================
Comment at: test/CodeGen/RISCV/rv64-large-stack.ll:42
+entry:
+ %w = alloca [100000000 x { fp128, fp128 }], align 16
+ %0 = bitcast [100000000 x { fp128, fp128 }]* %w to i8*
----------------
lenary wrote:
> I think this test case can be significantly simplified. You should just need a single alloca, and then maybe a call that uses a pointer into the alloca?
Yes, it becomes significantly cleaner, thanks!
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61884/new/
https://reviews.llvm.org/D61884
More information about the llvm-commits
mailing list