This is an archive of the discontinued LLVM Phabricator instance.

[X86][SSE] Move VZEXT_MOVL removal into SimplifyDemandedVectorEltsForTargetNode
ClosedPublic

Authored by RKSimon on May 4 2020, 9:21 AM.

Details

Summary

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

By making use a call to 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.

I was hoping to do this even more generally by handling it in the target shuffle combines below but this is yet another occasion where I need to finish D66004 first.

Diff Detail

Event Timeline

RKSimon created this revision.May 4 2020, 9:21 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 4 2020, 9:21 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
craig.topper added inline comments.May 4 2020, 12:20 PM
llvm/lib/Target/X86/X86ISelLowering.cpp
36617

Should this be in computeKnownBitsForTargetNode instead since we're not doing the simplification?

RKSimon marked an inline comment as done.May 4 2020, 1:50 PM
RKSimon added inline comments.
llvm/lib/Target/X86/X86ISelLowering.cpp
36617

Sure, I'll check what it looks like using computeKnownBits instead.

RKSimon updated this revision to Diff 262079.May 5 2020, 5:41 AM

Use computeKnownBits instead

This revision is now accepted and ready to land.May 5 2020, 10:49 AM
RKSimon edited the summary of this revision. (Show Details)May 5 2020, 11:33 AM
This revision was automatically updated to reflect the committed changes.