OSDN Git Service

[InstCombine] Convert a masked.load of a dereferenceable address to an unconditional...
authorPhilip Reames <listmail@philipreames.com>
Tue, 23 Apr 2019 15:25:14 +0000 (15:25 +0000)
committerPhilip Reames <listmail@philipreames.com>
Tue, 23 Apr 2019 15:25:14 +0000 (15:25 +0000)
commitaab3c8c7b38b28a3cbcb016f2476182dd2a09686
treec0be529089298ecc46058832c9fa1ce2797809af
parentfcd06adc8e2b4cccc9c4f9c7cdc7ae6872f3b6fb
[InstCombine] Convert a masked.load of a dereferenceable address to an unconditional load

If we have a masked.load from a location we know to be dereferenceable, we can simply issue a speculative unconditional load against that address. The key advantage is that it produces IR which is well understood by the optimizer. The select (cnd, load, passthrough) form produced should be pattern matchable back to hardware predication if profitable.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359000 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombineCalls.cpp
test/Transforms/InstCombine/masked_intrinsics.ll