[PATCH] D30703: [DSE] Merge stores when the later store only writes to memory locations the early store also wrote to.

Filipe Cabecinhas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 7 10:07:09 PST 2017


filcab created this revision.

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.


https://reviews.llvm.org/D30703

Files:
  lib/Transforms/Scalar/DeadStoreElimination.cpp
  test/Transforms/DeadStoreElimination/PartialStore.ll
  test/Transforms/DeadStoreElimination/combined-partial-overwrites.ll
  test/Transforms/DeadStoreElimination/merge-stores.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D30703.90876.patch
Type: text/x-patch
Size: 13545 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170307/a592263a/attachment.bin>


More information about the llvm-commits mailing list