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
Paths
| Differential D143026
[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 Alive2 Links:
Diff Detail
Event TimelineThis 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 Closed by commit rG2a3732f934b1: Add transform for `(mul X, OddC) eq/ne N * C` --> `X eq/ne N` (authored by goldstein.w.n). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 495245 llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
llvm/test/Transforms/InstCombine/icmp-mul.ll
|