This is an archive of the discontinued LLVM Phabricator instance.

[SelectionDAG] Enable iX SimplifyDemandedBits to vXi1 SimplifyDemandedVectorElts simplification
ClosedPublic

Authored by craig.topper on Oct 9 2018, 7:16 AM.

Details

Summary

Patch showing the effect of enabling bool vector oversimplification.

Non-VLX builds can simplify a kshift shuffle, but VLX builds simplify:

insert_subvector v8i zeroinitializer, v2i --> insert_subvector v8i undef, v2i

Preventing the removal of the AND to clear the upper bits of result

Diff Detail

Repository
rL LLVM

Event Timeline

RKSimon created this revision.Oct 9 2018, 7:16 AM

I haven't looked into this yet but I'm hoping this can be fixed by reusing the isTypePromotionOfi1ZeroUpBits code somehow.

RKSimon updated this revision to Diff 216365.Aug 21 2019, 3:53 AM

Rebased - I was hoping D66489 would help more tbh...

Herald added a project: Restricted Project. · View Herald TranscriptAug 21 2019, 3:53 AM
craig.topper commandeered this revision.Aug 22 2019, 12:22 PM
craig.topper updated this revision to Diff 216688.
craig.topper edited reviewers, added: RKSimon; removed: craig.topper.

Added a quick hack DAG combine and a FIXME to prevent the regressions.

RKSimon accepted this revision.Aug 23 2019, 4:07 AM

LGTM - thanks for handling this!

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