[X86][SSE] Improve lowering of vXi64 multiply with known zero 32-bit halves
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 17 Nov 2016 12:14:49 +0000 (12:14 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 17 Nov 2016 12:14:49 +0000 (12:14 +0000)
commit8eca5520dc5d7a570f52dff9576c04fb54657bba
tree2f32929332ecba43b3f34f49025d8ffa32b943ca
parentc4d733cd6af7f821657f44d65ada5177e6d7304f
[X86][SSE] Improve lowering of vXi64 multiply with known zero 32-bit halves

vXi64 multiplication is lowered into 3 calls of vpmuludq with the upper/lower 32-bit halves.

If any of these halves are zero then we can remove individual calls. Although there was isBuildVectorAllZeros code to do this I don't think it ever worked (maybe just for constant folded cases that don't seem to be tested for any longer).

This requires additional X86ISD support for computeKnownBitsForTargetNode, so far I've just added support for X86ISD::VZEXT (VPMOVZX* - helping the AVX2+ cases).

Partial fix for PR30845

Differential Revision: https://reviews.llvm.org/D26590

llvm-svn: 287223
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/pmul.ll