summaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorFraser Cormack <fraser@codeplay.com>2022-05-11 14:08:41 +0100
committerFraser Cormack <fraser@codeplay.com>2022-05-17 08:49:08 +0100
commit821522d343cd127312fb07b53aa99e22b3aacc0c (patch)
tree8370c304412ea46cb40f6e1004b4c492631f4776 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parent599ff247dee8f462638731c3b2fdd3d1e332a2fe (diff)
[RISCV] Add a test w/ RVV stack objects misaligning non-RVV ones
This patch adds a simple test which demonstrates a miscompilation of 16-byte-aligned scalar (non-RVV) objects when combined with RVV stack objects. The RISCV stack is assumed to be aligned to 16 bytes, and this is guaranteed/assumed to be true when setting up the stack. However, when the stack contains RVV objects, we decrement the stack pointer by some multiple of vlenb, which is only guaranteed to be aligned to 8 bytes. This means that non-RVV objects specifically requiring 16-byte alignment fall through the cracks and are misaligned. Objects requiring larger alignment trigger stack realignment and thus should be okay. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D125382
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions