aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/TextAPI/ArchitectureSet.cpp
diff options
context:
space:
mode:
authorFraser Cormack <fraser@codeplay.com>2021-01-20 07:49:53 +0000
committerFraser Cormack <fraser@codeplay.com>2021-04-05 11:51:03 +0100
commit0d0514dd9b81bdf7a2ba5f5ef1d36d6e96201a0b (patch)
treed5180f59fef88d996423069f8df81803c24dffb8 /llvm/lib/TextAPI/ArchitectureSet.cpp
parent36d4f6d7f8ad08bb99da544f2b6ca96e34977839 (diff)
downloadllvm-0d0514dd9b81bdf7a2ba5f5ef1d36d6e96201a0b.zip
llvm-0d0514dd9b81bdf7a2ba5f5ef1d36d6e96201a0b.tar.gz
llvm-0d0514dd9b81bdf7a2ba5f5ef1d36d6e96201a0b.tar.bz2
[RISCV] Add a test showing incorrect codegen
This patch adds a test which shows how the compiler incorrectly sets the size and alignment of a stack object used to indirectly pass vector types to functions. In the particular example, the test passes a <4 x i8> vector type to a function and creates a stack object of size and alignment equal to 4 bytes. However, the code generated to set up that parameter has been scalarized and stores each element as individual XLEN-sized values. Thus on RV32 this stores 16 bytes and on RV64 32 bytes, both of which clobber the stack. Similarly, the alignment is set up as the alignment of the vector type, which is not necessarily the natural alignment of XLEN. Reviewed By: luismarques Differential Revision: https://reviews.llvm.org/D95025
Diffstat (limited to 'llvm/lib/TextAPI/ArchitectureSet.cpp')
0 files changed, 0 insertions, 0 deletions