[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@329577 91177308-0d34-0410-b5e6-96231b3b80d8
2 files changed