[X86][SSE] Move VZEXT_MOVL removal into SimplifyDemandedVectorEltsForTargetNode
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 6 May 2020 12:58:46 +0000 (13:58 +0100)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 6 May 2020 13:05:07 +0000 (14:05 +0100)
commit8650b36935ae8e9d584550539161e5851a17a912
treec98547f8e8e2df1e26e8fe4ccde9f6c5cc39fe8c
parent1c4f118d893fd8042b0ce781d68242e88337be62
[X86][SSE] Move VZEXT_MOVL removal into SimplifyDemandedVectorEltsForTargetNode

This patch replaces the VZEXT_MOVL removal from combineShuffle with a more general version based in SimplifyDemandedVectorEltsForTargetNode.

By using computeKnownBits we can always remove the VZEXT_MOVL if the upper elements of the source operand are known to be zero.

This requires us to add the conversion ops to computeKnownBitsForTargetNode as well.

Reviewed By: @craig.topper

Differential Revision: https://reviews.llvm.org/D79335
llvm/lib/Target/X86/X86ISelLowering.cpp