This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Ensure condition (SUBS) has no uses of value in performCONDCombine
ClosedPublic

Authored by dmgreen on Oct 2 2022, 2:39 PM.

Details

Summary

performCONDCombine removes and 0xff in patterns of SUBS (and (add(,.), 0xff), C) under certain complex conditions. It doesn't come up often, but in the lowering of usub.sat where the SUBS is both uses as a condition and as a value, the and is removed where it would only be valid for the condition.

Removing performCONDCombine entirely alters none of the existing lit tests, except for the two pr58109 tests added for this (which the differences of here are shown here). It does appear to come up in some cases in larger codebases.

Fixes #58109.

Diff Detail

Event Timeline

dmgreen created this revision.Oct 2 2022, 2:39 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 2 2022, 2:39 PM
dmgreen requested review of this revision.Oct 2 2022, 2:39 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 2 2022, 2:39 PM
dmgreen edited the summary of this revision. (Show Details)Oct 2 2022, 2:39 PM
samtebbs accepted this revision.Oct 3 2022, 2:10 AM

LGTM

This revision is now accepted and ready to land.Oct 3 2022, 2:10 AM
This revision was landed with ongoing or failed builds.Oct 4 2022, 1:18 PM
This revision was automatically updated to reflect the committed changes.