[X86][AVX] truncateVectorWithPACK - avoid bitcasted shuffles
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 26 Jun 2019 09:50:11 +0000 (09:50 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 26 Jun 2019 09:50:11 +0000 (09:50 +0000)
commit3845a4f849309eab5dabecf1b0b6320af60b3dea
tree104fff75e6e3fa81aecda8775d186a07afc6a785
parent1a0810407edcff9791a5354d762ef8b4e7c07287
[X86][AVX] truncateVectorWithPACK - avoid bitcasted shuffles

truncateVectorWithPACK is often used in conjunction with ComputeNumSignBits which struggles when peeking through bitcasts.

This fix tries to avoid bitcast(shuffle(bitcast())) patterns in the 256-bit 64-bit sublane shuffles so we can still see through at least until lowering when the shuffles will need to be bitcasted to widen the shuffle type.

llvm-svn: 364401
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/bitcast-setcc-512.ll
llvm/test/CodeGen/X86/bitcast-vector-bool.ll
llvm/test/CodeGen/X86/movmsk-cmp.ll