[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)
commit2ce017026af538867d592b64a75e182cddab1961
tree5853d8978ea822d535b45281b76740605a41346f
parent12a561fa1b79c449d518100e1dd0dfce0a37b65d
[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

llvm-svn: 359000
llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
llvm/test/Transforms/InstCombine/masked_intrinsics.ll