OSDN Git Service

[X86] Relax an assertion when legalizing vector types.
authorDavide Italiano <davide@freebsd.org>
Sun, 9 Jul 2017 19:22:48 +0000 (19:22 +0000)
committerDavide Italiano <davide@freebsd.org>
Sun, 9 Jul 2017 19:22:48 +0000 (19:22 +0000)
commite7b6244965e058022e686d697a6c02e871720b39
tree604e45feb72f63528059701a45047dd5d20aa057
parent6c560b5efb48e5d0315298780852795ea69fdd19
[X86] Relax an assertion when legalizing vector types.

WidenVSELECTAndMask can fold (and it folds in this case) so we
get a BUILD_VECTOR of constants as mask. convertMask() seems to
work fine when the input is a vector of constants, and we still
need to call it to extend/add elements at the end. but the current
code just asserts on anything but a SETCC or AND/OR/XOR of 2xSETCC.
This change was discussed briefly with Simon Pilgrim, who also
suggests we might consider dropping this assertion in the future.

Fixes PR33715.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307508 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
test/CodeGen/X86/pr33715.ll [new file with mode: 0644]