llvm-project/llvm/test/Transforms/DeadStoreElimination
Sanjay Patel 1d04b5bacf [DSE] Merge stores when the later store only writes to memory locations the early store also wrote to (2nd try)
This is a 2nd attempt at:
https://reviews.llvm.org/rL310055
...which was reverted at rL310123 because of PR34074:
https://bugs.llvm.org/show_bug.cgi?id=34074

In this version, we break out of the inner loop after we successfully merge and kill a pair of stores. In the
earlier rev, we were continuing instead, which meant we could process the invalid info from a now dead store.

Original commit message (authored by Filipe Cabecinhas):

This fixes PR31777.

If both stores' values are ConstantInt, we merge the two stores
(shifting the smaller store appropriately) and replace the earlier (and
larger) store with an updated constant.

In the future we should also support vectors of integers. And maybe
float/double if we can.  

Differential Revision: https://reviews.llvm.org/D30703

llvm-svn: 314206
2017-09-26 13:54:28 +00:00
..
2011-03-25-DSEMiscompile.ll
2011-09-06-EndOfFunction.ll
2011-09-06-MemCpy.ll
2016-07-17-UseAfterFree.ll
OverwriteStoreBegin.ll
OverwriteStoreEnd.ll
PartialStore.ll [DSE] Merge stores when the later store only writes to memory locations the early store also wrote to (2nd try) 2017-09-26 13:54:28 +00:00
atomic.ll
calloc-store.ll
combined-partial-overwrites.ll [DSE] Merge stores when the later store only writes to memory locations the early store also wrote to (2nd try) 2017-09-26 13:54:28 +00:00
const-pointers.ll
crash.ll
cs-cs-aliasing.ll
dominate.ll Add address space mangling to lifetime intrinsics 2017-04-10 20:18:21 +00:00
fence.ll
free.ll
inst-limits.ll Remove the obsolete offset parameter from @llvm.dbg.value 2017-07-28 20:21:02 +00:00
invariant.start.ll
libcalls.ll
lifetime.ll Add address space mangling to lifetime intrinsics 2017-04-10 20:18:21 +00:00
memintrinsics.ll
merge-stores-big-endian.ll [DSE] Merge stores when the later store only writes to memory locations the early store also wrote to (2nd try) 2017-09-26 13:54:28 +00:00
merge-stores.ll [DSE] Merge stores when the later store only writes to memory locations the early store also wrote to (2nd try) 2017-09-26 13:54:28 +00:00
no-targetdata.ll
operand-bundles.ll
pr11390.ll
simple.ll