This is an archive of the discontinued LLVM Phabricator instance.

[InstCombine] Add tests for canonicalizing `(X^(X-1)) u{ge,lt} X` as pow2 test; NFC
ClosedPublic

Authored by goldstein.w.n on Jun 11 2023, 11:28 PM.

Diff Detail

Unit TestsFailed

Event Timeline

goldstein.w.n created this revision.Jun 11 2023, 11:28 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 11 2023, 11:28 PM
Herald added a subscriber: StephenFan. · View Herald Transcript
goldstein.w.n requested review of this revision.Jun 11 2023, 11:28 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 11 2023, 11:28 PM
nikic accepted this revision.Jun 12 2023, 11:59 AM

LGTM

llvm/test/Transforms/InstCombine/ispow2.ll
1213

I'd add two more negative tests where the operands in and/xor and xor/icmp are not the same.

This revision is now accepted and ready to land.Jun 12 2023, 11:59 AM

Add more negative tests

This revision was landed with ongoing or failed builds.Jul 21 2023, 12:15 PM
This revision was automatically updated to reflect the committed changes.