OSDN Git Service

[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)
commitc9799c0f2d8bd9ebf90f52277e6430d30b5f3052
tree08de4f3c85508e2e5e0bcad0c23b969977102c9e
parentace4c03e5962c8d5c217833d932c75770a6c59a0
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287223 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/pmul.ll