This is an archive of the discontinued LLVM Phabricator instance.

[InstSimplify] sle on i1 also encodes implication
ClosedPublic

Authored by craig.topper on Aug 12 2022, 1:35 PM.

Details

Summary

We already support SGE, so the same logic should hold for SLE with
the LHS and RHS swapped.

I didn't see this in the wild. Just happened to walk past this code
and thought it was odd that it was asymmetric in what condition
codes it handled.

Diff Detail

Event Timeline

craig.topper created this revision.Aug 12 2022, 1:35 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 12 2022, 1:35 PM
craig.topper requested review of this revision.Aug 12 2022, 1:35 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 12 2022, 1:35 PM
reames accepted this revision.Aug 15 2022, 8:00 AM
This revision is now accepted and ready to land.Aug 15 2022, 8:00 AM
spatel accepted this revision.Aug 15 2022, 8:02 AM

LGTM

This revision was automatically updated to reflect the committed changes.