[x86] Restore the bitcasts I removed when refactoring this to avoid
authorChandler Carruth <chandlerc@gmail.com>
Sat, 30 May 2015 04:05:11 +0000 (04:05 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Sat, 30 May 2015 04:05:11 +0000 (04:05 +0000)
commitd8018eeac9861e47c4216a10a2296887ed20c19a
tree2ed86a14d7077da05b8670b99f5568115b53b612
parent828f5b807cc2cec7dc3e25730e3c6bac965d17e2
[x86] Restore the bitcasts I removed when refactoring this to avoid
shifting vectors of bytes as x86 doesn't have direct support for that.

This removes a bunch of redundant masking in the generated code for SSE2
and SSE3.

In order to avoid the really significant code size growth this would
have triggered, I also factored the completely repeatative logic for
shifting and masking into two lambdas which in turn makes all of this
much easier to read IMO.

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