]> granicus.if.org Git - llvm/commit
[LV] Support invariant addresses in speculation logic
authorPhilip Reames <listmail@philipreames.com>
Thu, 12 Sep 2019 16:49:10 +0000 (16:49 +0000)
committerPhilip Reames <listmail@philipreames.com>
Thu, 12 Sep 2019 16:49:10 +0000 (16:49 +0000)
commitf0e52d999feafb63381e38d204262fea6e124e15
tree9b74a496762d91eb691df860caeeec68b54fe95b
parent3110f6b18ee13c1a73bb86497381a1fddf7795e4
[LV] Support invariant addresses in speculation logic

Implement a TODO from rL371452, and handle loop invariant addresses in predicated blocks. If we can prove that the load is safe to speculate into the header, then we can avoid using a masked.load in favour of a normal load.

This is mostly about vectorization robustness. In the common case, it's generally expected that LICM/LoadStorePromotion would have eliminated such loads entirely.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371745 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/Loads.cpp
test/Transforms/LoopVectorize/X86/load-deref-pred.ll