[InstCombine] ease alignment restriction for converting masked load to normal load
authorSanjay Patel <spatel@rotateright.com>
Tue, 29 Sep 2020 19:25:04 +0000 (15:25 -0400)
committerSanjay Patel <spatel@rotateright.com>
Tue, 29 Sep 2020 19:26:22 +0000 (15:26 -0400)
commit0527c8749b90cc742077ae9b3def80efde721090
tree5902013879e51b97917af6a301374cce5b34503e
parenta89fc12653c520a5a70249e07c0a394584f4abbe
[InstCombine] ease alignment restriction for converting masked load to normal load

I think we initially made this fold conservative to be safer, but we do not
need the alignment attribute/metadata limitation because the masked load
intrinsic itself specifies the alignment. A normal vector load is better for
IR transforms and should be no worse in codegen than the masked alternative.
If it is worse for some target, the backend can reverse this transform.

Differential Revision: https://reviews.llvm.org/D88505
llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
llvm/test/Transforms/InstCombine/masked_intrinsics.ll