This is an archive of the discontinued LLVM Phabricator instance.

[ControlHeightReduction] Use logical and
ClosedPublic

Authored by nikic on May 18 2022, 9:05 AM.

Details

Summary

Use logical instead of bitwise and to combine conditions, to avoid propagating poison from a later condition if an earlier one is already false. This avoids introducing branch on poison.

Diff Detail

Event Timeline

nikic created this revision.May 18 2022, 9:05 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 18 2022, 9:05 AM
nikic requested review of this revision.May 18 2022, 9:05 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 18 2022, 9:05 AM
nikic updated this revision to Diff 431619.May 24 2022, 2:23 AM
nikic added reviewers: fhahn, nlopes, aqjune, spatel.

Rebase over InstCombine changes.

spatel accepted this revision.May 26 2022, 6:22 AM

I don't know this pass, but it's logically correct, so LGTM.

This revision is now accepted and ready to land.May 26 2022, 6:22 AM
fhahn accepted this revision.May 26 2022, 7:07 AM

LGTM as this is needed for correctness.

This revision was automatically updated to reflect the committed changes.