[DAGCombiner] Replace gathers with a zero mask with the passthru value
authorBenjamin Kramer <benny.kra@googlemail.com>
Wed, 29 May 2019 19:24:19 +0000 (19:24 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Wed, 29 May 2019 19:24:19 +0000 (19:24 +0000)
commit107f8d98730c9f38f28b462f0e11901274f93cdd
treecf97a6f27871c47b41ef88a81406a35f9be063ec
parent1d7ca677697f5b6bb40011e7fc962bb1a158e96a
[DAGCombiner] Replace gathers with a zero mask with the passthru value

These can be created by the legalizer when splitting a larger gather.

See https://llvm.org/PR42055 for a motivating example.

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

llvm-svn: 362015
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/test/CodeGen/X86/avx2-masked-gather.ll