aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineInstr.cpp
diff options
context:
space:
mode:
authorAmara Emerson <amara@apple.com>2023-04-12 09:40:59 -0700
committerAmara Emerson <amara@apple.com>2023-04-12 16:43:14 -0700
commit29c851f4e2ff9dc55146be88ae0df3d378a7be9f (patch)
treee343b470a40a33b9dbd0dbf12bf8089c89b57d15 /llvm/lib/CodeGen/MachineInstr.cpp
parent4b47d875a1f9083ed788dac32bde45364afb8668 (diff)
downloadllvm-29c851f4e2ff9dc55146be88ae0df3d378a7be9f.zip
llvm-29c851f4e2ff9dc55146be88ae0df3d378a7be9f.tar.gz
llvm-29c851f4e2ff9dc55146be88ae0df3d378a7be9f.tar.bz2
[GlobalISel] Move the truncstore_merge combine to the LoadStoreOpt pass and add support for an extra case.
If we have set of mergeable stores of shifts, but the original source value being shifted is wider than the merged size, we should still be able to merge if we truncate first. To do this however we need to search for stores speculatively up the block, without knowing exactly how many stores we should see before we stop. The old algorithm has to match an exact number of stores to fit the wide type, or it dies. The new one will try to set the wide type to however many stores we found in the upwards block traversal and use later checks to verify if they're a valid mergeable set. The reason I need to move this to LoadStoreOpt is because the combiner works going top down inside a block, which means that we end up doing partial merges because we haven't seen all the possible stores before we mutate the MIR. In LoadStoreOpt we can go bottom up. As a side effect of this change, we also end up doing better on an existing test case (missing_store) since we manage to do a partial merge there.
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
0 files changed, 0 insertions, 0 deletions