This is an archive of the discontinued LLVM Phabricator instance.

[ValueTracking] Add tests for more `isKnownToBeAPowerOfTwo` cases; NFC
ClosedPublic

Authored by goldstein.w.n on Aug 7 2023, 10:46 AM.

Diff Detail

Event Timeline

goldstein.w.n created this revision.Aug 7 2023, 10:46 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 7 2023, 10:46 AM
Herald added a subscriber: StephenFan. · View Herald Transcript
goldstein.w.n requested review of this revision.Aug 7 2023, 10:46 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 7 2023, 10:46 AM
nikic added inline comments.Aug 7 2023, 11:26 AM
llvm/test/Analysis/ValueTracking/known-power-of-two.ll
335

It would be good to add a negative test for non-rotate funnel shift (i.e. both args being pow2 does not imply the result being pow2 in that case).

Add funnel shift tests for non-rotates

goldstein.w.n marked an inline comment as done.Aug 7 2023, 11:44 AM
nikic accepted this revision.Aug 7 2023, 12:13 PM

LGTM

This revision is now accepted and ready to land.Aug 7 2023, 12:13 PM
This revision was landed with ongoing or failed builds.Aug 9 2023, 12:45 PM
This revision was automatically updated to reflect the committed changes.