Lower vselects into X86ISD::BLENDI when appropriate.
authorFilipe Cabecinhas <me@filcab.net>
Fri, 16 May 2014 22:47:49 +0000 (22:47 +0000)
committerFilipe Cabecinhas <me@filcab.net>
Fri, 16 May 2014 22:47:49 +0000 (22:47 +0000)
commit5ea7215050818473565584b76bdf53c862754a79
treecbd989a9e28344dfed86770cf1b36addc97dd31c
parent38cbea805734073e01449017601d6728c94434d3
Lower vselects into X86ISD::BLENDI when appropriate.

LowerVSELECT will, if possible, generate a X86ISD::BLENDI DAG node if the
condition is constant and we can emit that instruction, given the
subtarget.

This is not enough for all cases. An additional SELECTCombine optimization
will be committed.

Fixed tests that were expecting variable blends but where a blend+imm can
be generated.
Added test where we can't emit blend+immediate.
Added avx2 blend+imm tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209043 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/avx-blend.ll
test/CodeGen/X86/avx2.ll [new file with mode: 0644]
test/CodeGen/X86/blend-msb.ll
test/CodeGen/X86/sse41-blend.ll
test/CodeGen/X86/sse41.ll