[X86] When using vpopcntdq for ctpop of v8i16 vectors, only promote to v8i32.
authorCraig Topper <craig.topper@intel.com>
Sat, 16 Dec 2017 19:31:36 +0000 (19:31 +0000)
committerCraig Topper <craig.topper@intel.com>
Sat, 16 Dec 2017 19:31:36 +0000 (19:31 +0000)
commit1260a4e826ecff1ba6a9076336fb735cc90dcd76
tree5bf3626d9e3f991fd45d00079f09b428ea1d1e0b
parent5029d676f82782c36b2217a542286eb1773756d5
[X86] When using vpopcntdq for ctpop of v8i16 vectors, only promote to v8i32.

Previously we promoted to v8i64, but we don't need to go all the way to 512-bits. If we have VLX we can use the 256-bit instruction. And even if we don't have VLX we can widen v8i32 to v16i32 and drop the upper half.

llvm-svn: 320926
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/vector-popcnt-128.ll
llvm/test/CodeGen/X86/vector-tzcnt-128.ll