This is an archive of the discontinued LLVM Phabricator instance.

[InstCombine] Add tests for reoredering (shift (add (shift x, C0), y), C1); NFC
ClosedPublic

Authored by goldstein.w.n on Jan 16 2023, 3:21 PM.

Diff Detail

Event Timeline

goldstein.w.n created this revision.Jan 16 2023, 3:21 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 16 2023, 3:21 PM
goldstein.w.n requested review of this revision.Jan 16 2023, 3:21 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 16 2023, 3:21 PM
goldstein.w.n retitled this revision from Add tests for reoredering (shift (add (shift x, C0), y), C1); NFC to [InstCombine] Add tests for reoredering (shift (add (shift x, C0), y), C1); NFC.Jan 16 2023, 3:22 PM
goldstein.w.n added reviewers: nikic, majnemer.

Add tests for sub as well

spatel accepted this revision.Jan 27 2023, 11:20 AM

LGTM

llvm/test/Transforms/InstCombine/shift-logic.ll
379

It would be good to add a "negative test" comment to this set of tests (and the corresponding sub variants) in D141875.

That way, it's clear that if they get changed somehow in a subsequent patch, it's probably a miscompile.

This revision is now accepted and ready to land.Jan 27 2023, 11:20 AM