[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)
commitc4b0ccd0492350eaefe141ee66df84dca109a620
tree72f18fc9888f39c815300c4bf8025d1facb9d9b6
parentb2f8b311d19232dd51b226f3b1caca94e9f11d7e
[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.

llvm-svn: 307508
llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
llvm/test/CodeGen/X86/pr33715.ll [new file with mode: 0644]