OSDN Git Service

[X86, AVX] recognize shufflevector with zero input as a vperm2 (PR22984)
authorSanjay Patel <spatel@rotateright.com>
Tue, 24 Mar 2015 19:19:07 +0000 (19:19 +0000)
committerSanjay Patel <spatel@rotateright.com>
Tue, 24 Mar 2015 19:19:07 +0000 (19:19 +0000)
commitfe76881930ac5a3eb9e523844e74f14c068e2281
tree400966d814fcfe685f823101ad3867cf91fe0ce1
parent1329ecfc783bb2c2087b9abdb1257467cb372db9
[X86, AVX] recognize shufflevector with zero input as a vperm2 (PR22984)

vperm2x128 instructions have the special ability (aka free hardware capability)
to shuffle zero values into a vector.

This patch recognizes that type of shuffle and generates the appropriate
control byte.

https://llvm.org/bugs/show_bug.cgi?id=22984

Differential Revision: http://reviews.llvm.org/D8563

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