[LICM&MSSA] Limit store hoisting.

Summary:
If there is no clobbering access for a store inside the loop, that store
can only be hoisted if there are no interfearing loads.
A more general verification introduced here: there are no loads that are
not optimized to an access outside the loop.
Addresses PR40586.

Reviewers: george.burgess.iv

Subscribers: sanjoy, jlebar, Prazek, llvm-commits

Tags: #llvm

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

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