[llvm] r310552 - [SelectionDAG] When scalarizing vselect, don't assert on

Hans Wennborg via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 10 10:37:40 PDT 2017

Merged to 5.0 in r310635.

On Thu, Aug 10, 2017 at 12:44 AM, Elad Cohen via llvm-commits
<llvm-commits at lists.llvm.org> wrote:
> Author: eladcohen
> Date: Thu Aug 10 00:44:23 2017
> New Revision: 310552
> URL: http://llvm.org/viewvc/llvm-project?rev=310552&view=rev
> Log:
> [SelectionDAG] When scalarizing vselect, don't assert on
> a legal cond operand.
> When scalarizing the result of a vselect, the legalizer currently expects
> to already have scalarized the operands. While this is true for the true/false
> operands (which have the same type as the result), it is not case for the
> condition operand. On X86 AVX512, v1i1 is legal - this leads to operations such
> as '< N x type> vselect < N x i1> < N x type> < N x type>' where < N x type > is
> illegal to hit an assertion during the scalarization.
> The handling is similar to r205625.
> This also exposes the fact that (v1i1 extract_subvector) should be legal
> and selectable on AVX512 - We do this by custom lowering to vector_extract_elt.
> This still leaves us in some cases with redundant dag nodes which will be
> combined in a separate soon to come patch.
> This fixes pr33349.
> Differential revision: https://reviews.llvm.org/D36511

More information about the llvm-commits mailing list