[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)
commit90ac572331e5fd6e3d7a6b011b08dd692408e2b9
tree3e1b3cfca7dcaa370c3d383f9f7b4f797c942228
parent7e924a68b54e04c83967831672207b269eff1ab5
[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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212257 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
test/CodeGen/X86/bswap-vector.ll