summaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorAndrew Savonichev <andrew.savonichev@gmail.com>2022-12-15 18:16:45 +0300
committerAndrew Savonichev <andrew.savonichev@gmail.com>2022-12-15 18:18:12 +0300
commitffedf47d8b793e07317f82f9c2a5f5425ebb71ad (patch)
tree77d83d2859ab9fc7bd6b10cca98e7e80ae33182d /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parentfaa1b57d16009790ed6fd59342b12607c5460b49 (diff)
[SelectionDAG] Do not second-guess alignment for alloca
Alignment of an alloca in IR can be lower than the preferred alignment on purpose, but this override essentially treats the preferred alignment as the minimum alignment. The patch changes this behavior to always use the specified alignment. If alignment is not set explicitly in LLVM IR, it is set to DL.getPrefTypeAlign(Ty) in computeAllocaDefaultAlign. Tests are changed as well: explicit alignment is increased to match the preferred alignment if it changes output, or omitted when it is hard to determine the right value (e.g. for pointers, some structs, or weird types). Differential Revision: https://reviews.llvm.org/D135462
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions