[x86] Fix the completely broken vector widening legalization of bswap.
authorChandler Carruth <chandlerc@gmail.com>
Thu, 3 Jul 2014 07:04:38 +0000 (07:04 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Thu, 3 Jul 2014 07:04:38 +0000 (07:04 +0000)
commit99b1104c46232eeb0299f09e0998c0e929fe89ce
tree86fa552d4fc8639b14307312ab430412e4940d7f
parent93de4b1608f196e641c44dea839b428cf0fb8cf7
[x86] Fix the completely broken vector widening legalization of bswap.

This operation was classified as a binary operation in the widening
logic for some reason (clearly, untested). It is in fact a unary
operation. Add a RUN line to a test to exercise this for x86.

Note that again the vector widening strategy doesn't regress anything
and in one case removes a totally unecessary instruction that we
couldn't avoid when promoting the element type.

llvm-svn: 212257
llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
llvm/test/CodeGen/X86/bswap-vector.ll