[X86] Promote i8 CTPOP to i32 instead of i16 when we have the POPCNT instruction.
authorCraig Topper <craig.topper@intel.com>
Thu, 30 Nov 2017 20:15:31 +0000 (20:15 +0000)
committerCraig Topper <craig.topper@intel.com>
Thu, 30 Nov 2017 20:15:31 +0000 (20:15 +0000)
commitd4257565cfa4173492b0c4d0fa85d37b9fad6e2a
tree54baf1c48156be5d5f6944c9059b0e2437840015
parentef3b80c57ba7c1c910a1d31548cf51f630913a04
[X86] Promote i8 CTPOP to i32 instead of i16 when we have the POPCNT instruction.

The 32-bit version is shorter to encode and the zext we emit for the promotion is likely going to be a 32-bit zero extend anyway.

llvm-svn: 319468
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/ctpop-combine.ll
llvm/test/CodeGen/X86/popcnt.ll