[MachineLICM] Re-enable hoisting of constant stores
authorZaara Syeda <syzaara@ca.ibm.com>
Mon, 9 Apr 2018 14:50:02 +0000 (14:50 +0000)
committerZaara Syeda <syzaara@ca.ibm.com>
Mon, 9 Apr 2018 14:50:02 +0000 (14:50 +0000)
commit935474fef57d9bf57cd7faca0deb1f2b0ce3e8c3
tree96def8cd421544ba3d39c84ca11dc408524af6b2
parentf0029a77382483aeede05c5d0ac8423a5eba7f7a
[MachineLICM] Re-enable hoisting of constant stores

This patch fixes an issue exposed on the SystemZ build bots when committing
https://reviews.llvm.org/rL327856. The hoisting was temporarily disabled with
an option. This patch now re-enables hoisting and checks that we only hoist a
store instruction when all its operands are either constant caller preserved
registers or immediates.

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

llvm-svn: 329577
llvm/lib/CodeGen/MachineLICM.cpp
llvm/test/CodeGen/SystemZ/hoist-const-stores.ll [new file with mode: 0644]