[x86] Simplify vector selection if condition value type matches vselect value type...
authorRobert Khasanov <rob.khasanov@gmail.com>
Tue, 28 Oct 2014 15:59:40 +0000 (15:59 +0000)
committerRobert Khasanov <rob.khasanov@gmail.com>
Tue, 28 Oct 2014 15:59:40 +0000 (15:59 +0000)
commitedf556ec1f7247d813cbe9f47d4626b5a284a20e
tree69118108b8c59bd47dcd3c01374f2f1bfa81a919
parent7435fa333d1b646690021bfaa9350355017d0bdf
[x86] Simplify vector selection if condition value type matches vselect value type and true value is all ones or false value is all zeros.
This transformation worked if selector is produced by SETCC, however SETCC is needed only if we consider to swap operands. So I replaced SETCC check for this case.
Added tests for vselect of <X x i1> values.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220777 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/avx512-select.ll
test/CodeGen/X86/vselect-avx.ll