Legalizer: Use the scalar bit width when promoting bit counting instrs on
authorBenjamin Kramer <benny.kra@googlemail.com>
Fri, 12 Sep 2014 12:50:27 +0000 (12:50 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Fri, 12 Sep 2014 12:50:27 +0000 (12:50 +0000)
commit66feb63c3ca6da3fd88d4d27eae057182a0a8650
tree7152f878c6d7981a007b85053114af1254b7dcd8
parent4a93e8dd02f6fea5cbd1c5aefb2b7cd035386420
Legalizer: Use the scalar bit width when promoting bit counting instrs on
vectors.

e.g. when promoting ctlz from <2 x i32> to <2 x i64> we have to fixup
the result by 32 bits, not 64. PR20917.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217671 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
test/CodeGen/X86/vec_ctbits.ll