This is an archive of the discontinued LLVM Phabricator instance.

[InstCombine] Add transform for `(mul X, OddC) eq/ne N * C` --> `X eq/ne N`
ClosedPublic

Authored by goldstein.w.n on Jan 31 2023, 3:56 PM.

Details

Summary

We previously only did this if the mul was nuw, but it works for
any odd value.

Alive2 Links:
EQ: https://alive2.llvm.org/ce/z/6_HPZ5
NE: https://alive2.llvm.org/ce/z/c34qSU

Diff Detail

Event Timeline

goldstein.w.n created this revision.Jan 31 2023, 3:56 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 31 2023, 3:56 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
goldstein.w.n requested review of this revision.Jan 31 2023, 3:56 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 31 2023, 3:56 PM
spatel accepted this revision.Feb 1 2023, 12:41 PM

LGTM

This revision is now accepted and ready to land.Feb 1 2023, 12:41 PM
This revision was landed with ongoing or failed builds.Feb 6 2023, 12:17 PM
This revision was automatically updated to reflect the committed changes.