[MachineFrameInfo][RISCV] Call ensureStackAlignment for objects created with scalable...
authorCraig Topper <craig.topper@sifive.com>
Thu, 20 Oct 2022 21:05:22 +0000 (14:05 -0700)
committerCraig Topper <craig.topper@sifive.com>
Thu, 20 Oct 2022 21:05:46 +0000 (14:05 -0700)
commit2c82080f0964c45663d5599505e88f9124fc5f73
tree7d46edfd1404ef8273908916e39a78bb4fbc733a
parentfd7469404bcd5c4142070ef17d94007a57268ff3
[MachineFrameInfo][RISCV] Call ensureStackAlignment for objects created with scalable vector stack id.

This is an alternative to fix PR57939 for RISC-V. It definitely
can be argued that the stack temporaries for RISC-V are being created
with an unnecessarily large alignment. But ignoring the alignment
in MachineFrameInfo also seems bad.

Looking at the test update that go with the current ID==0 check,
it was intending to exclude things like the NoAlloc stackid. So I'm
not sure if scalable vectors are intentionally being excluded.

Reviewed By: reames

Differential Revision: https://reviews.llvm.org/D135913
12 files changed:
llvm/include/llvm/CodeGen/MachineFrameInfo.h
llvm/lib/CodeGen/MachineFrameInfo.cpp
llvm/lib/Target/RISCV/RISCVFrameLowering.cpp
llvm/test/CodeGen/RISCV/rvv/calling-conv-fastcc.ll
llvm/test/CodeGen/RISCV/rvv/calling-conv.ll
llvm/test/CodeGen/RISCV/rvv/extractelt-fp.ll
llvm/test/CodeGen/RISCV/rvv/extractelt-i1.ll
llvm/test/CodeGen/RISCV/rvv/extractelt-int-rv32.ll
llvm/test/CodeGen/RISCV/rvv/extractelt-int-rv64.ll
llvm/test/CodeGen/RISCV/rvv/fixed-vectors-insert-subvector.ll
llvm/test/CodeGen/RISCV/rvv/named-vector-shuffle-reverse.ll
llvm/test/CodeGen/RISCV/rvv/rvv-args-by-mem.ll