And actually use vpblendw

This commit is contained in:
Dr. Chat 2015-05-05 12:09:45 -05:00
parent c1f9952cbd
commit c3f1e74814
1 changed files with 6 additions and 2 deletions

View File

@ -5601,12 +5601,16 @@ EMITTER(PERMUTE_I32, MATCH(I<OPCODE_PERMUTE, V128<>, I32<>, V128<>, V128<>>)) {
if (i.dest != src3) {
e.vpshufd(i.dest, src2, src_control);
e.vpshufd(e.xmm0, src3, src_control);
e.vpblendd(i.dest, e.xmm0, blend_control); // $0 = $1 <blend> $2
} else {
e.vmovaps(e.xmm0, src3);
e.vpshufd(i.dest, src2, src_control);
e.vpshufd(e.xmm0, e.xmm0, src_control);
e.vpblendd(i.dest, e.xmm0, blend_control);
}
if (e.cpu()->has(Xbyak::util::Cpu::tAVX2)) {
e.vpblendd(i.dest, e.xmm0, blend_control); // $0 = $1 <blend> $2
} else {
e.vpblendw(i.dest, e.xmm0, blend_control); // $0 = $1 <blend> $2
}
} else {
// Permute by non-constant.