This is an archive of the discontinued LLVM Phabricator instance.

[TargetLowering][X86] Teach SimplifyDemandedVectorElts to replace the base vector of INSERT_SUBVECTOR with undef if none of the elements are demanded even if the node has other users.
ClosedPublic

Authored by craig.topper on Aug 3 2019, 10:03 PM.

Details

Summary

The SimplifyDemandedVectorElts function can replace with undef
when no elements are demanded, but due to how it interacts with
TargetLoweringOpts, it can only do this when the node has
no other users.

Remove a now unneeded DAG combine from the X86 backend.

Diff Detail

Repository
rL LLVM

Event Timeline

craig.topper created this revision.Aug 3 2019, 10:03 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 3 2019, 10:03 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
RKSimon accepted this revision.Aug 4 2019, 3:48 AM

LGTM - cheers!

This revision is now accepted and ready to land.Aug 4 2019, 3:48 AM
This revision was automatically updated to reflect the committed changes.