aboutsummaryrefslogtreecommitdiff
path: root/llvm/utils/UpdateTestChecks/common.py
diff options
context:
space:
mode:
authorMarkus Böck <markus.bock+llvm@nextsilicon.com>2023-07-04 16:48:17 +0200
committerMarkus Böck <markus.bock+llvm@nextsilicon.com>2023-07-05 13:57:08 +0200
commitf6df11568e83960ef698fc979965428c6b431344 (patch)
treeec6e4d46da420dbdaebe2986cfb8b122f850efc9 /llvm/utils/UpdateTestChecks/common.py
parent5e4ad816bf100b0325ed45ab1cfea18deb3ab3d1 (diff)
downloadllvm-f6df11568e83960ef698fc979965428c6b431344.zip
llvm-f6df11568e83960ef698fc979965428c6b431344.tar.gz
llvm-f6df11568e83960ef698fc979965428c6b431344.tar.bz2
[mlir][llvm] add basic type consistency pattern destructuring stores
This is a common pattern produced by clang and similar. Essentially, it coalesces stores into adjacent integer fields into a single integer store. This violates our definition of type-consistency that the pass is supposed to enforce and also prevents SROA and mem2reg from eliminating `alloca`s. This patch fixes that by splitting these stores into multiple stores. It does so by simply using logical shift rights and truncating the produced value to the size of the field, optionally bitcasting before storing into the field. The implementation is currently very simple, only working on struct types of a single depth and adjacent fields in that struct, with no padding inbetween. Future work could improve on these once required. Differential Revision: https://reviews.llvm.org/D154449
Diffstat (limited to 'llvm/utils/UpdateTestChecks/common.py')
0 files changed, 0 insertions, 0 deletions