This is an archive of the discontinued LLVM Phabricator instance.

[InstCombine] Add tests for indirect mul by power of 2; NFC
ClosedPublic

Authored by goldstein.w.n on Mar 17 2023, 7:04 PM.

Diff Detail

Event Timeline

goldstein.w.n created this revision.Mar 17 2023, 7:04 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 17 2023, 7:04 PM
goldstein.w.n requested review of this revision.Mar 17 2023, 7:04 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 17 2023, 7:04 PM
goldstein.w.n retitled this revision from Add tests for indirect mul by power of 2; NFC to [InstCombine] Add tests for indirect mul by power of 2; NFC.Mar 17 2023, 7:05 PM
goldstein.w.n added reviewers: nikic, spatel, majnemer.
nikic added inline comments.Mar 18 2023, 4:55 AM
llvm/test/Transforms/InstCombine/mul-pow2.ll
63

Missing a commuted test -- everything here gets canonicalized to mul s, x.

Also missing a multi-use test. This is going to fail (as in, perform an unprofitable transform) due to open FIXMEs in takeLog2(), but we should at least highlight that the problem exists.

Put tests in canonical commuted form. Add multiuse tests

goldstein.w.n marked an inline comment as done.Mar 18 2023, 1:53 PM

Add flag propegation test

nikic accepted this revision.Mar 18 2023, 2:19 PM

LGTM

This revision is now accepted and ready to land.Mar 18 2023, 2:19 PM
This revision was landed with ongoing or failed builds.Apr 7 2023, 12:58 PM
This revision was automatically updated to reflect the committed changes.