This is an archive of the discontinued LLVM Phabricator instance.

[DAG] Peek through zext/trunc when matching (or (and X, (not Y)), Y).
ClosedPublic

Authored by deadalnix on Apr 7 2023, 4:33 PM.

Details

Summary

This shows up in the wild, notably as a regression in D127115 .

Depends on D147821

Diff Detail

Event Timeline

deadalnix created this revision.Apr 7 2023, 4:33 PM
deadalnix requested review of this revision.Apr 7 2023, 4:33 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 7 2023, 4:33 PM

Please can you confirm that all of these changes have test coverage?

deadalnix updated this revision to Diff 512424.Apr 11 2023, 6:24 AM

Make sure we have a test cases for both "directions" for the or.

Added test cases in and-or-fold.ll to cover the or (and x, y), x --> x case, but this was already optimized, so no change in this patch.

RKSimon accepted this revision.Apr 11 2023, 6:26 AM

LGTM - cheers

This revision is now accepted and ready to land.Apr 11 2023, 6:26 AM
This revision was landed with ongoing or failed builds.Apr 11 2023, 6:48 AM
This revision was automatically updated to reflect the committed changes.