[InstCombine] Extend peephole DSE to handle unordered atomics
authorPhilip Reames <listmail@philipreames.com>
Thu, 17 Dec 2015 22:19:27 +0000 (22:19 +0000)
committerPhilip Reames <listmail@philipreames.com>
Thu, 17 Dec 2015 22:19:27 +0000 (22:19 +0000)
commitb96976e30de64e7ee32851c909e0ab909016b4ce
tree3ea81b2ec5e2a341ad6098c37c9416d40d8f49c8
parent7e54c38de03268a98f329069556b7bcf166c8f05
[InstCombine] Extend peephole DSE to handle unordered atomics

This extends the same line of reasoning used in EarlyCSE w/http://reviews.llvm.org/D15352 to the DSE implementation in InstCombine.

Key points:
 * We only remove unordered or simple stores.
 * The loads producing values consumed by dead stores don't influence whether the store is dead.

Differential Revision: http://reviews.llvm.org/D15354

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255932 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
test/Transforms/InstCombine/store.ll