HomePhabricator

[LICM] Hoist loads that are dominated by invariant.start intrinsic, and are…

Description

[LICM] Hoist loads that are dominated by invariant.start intrinsic, and are invariant in the loop.

Summary:
We can hoist out loads that are dominated by invariant.start, to the preheader.
We conservatively assume the load is variant, if we see a corresponding
use of invariant.start (it could be an invariant.end or an escaping
call).

Reviewers: mkuper, sanjoy, reames

Subscribers: llvm-commits

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