[PATCH] D133667: [InstCombine] convert mul by negative-pow2 to negate and shift

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 2 09:20:48 PDT 2022


spatel added a comment.

We inverted the general negator transform with:
ee0bf6472291 <https://reviews.llvm.org/rGee0bf6472291bd40687046ab2990f987a022a940>
...and I haven't seen any complaints after ~10 days. That also partly resolved the diff for issue #57576. This patch still reduces the IR in that example without changing codegen.

Negator will still create a mul from a shl+negate, but it's less likely that we'll conflict with the proposal here, so I think it's safe to give this a try now.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D133667/new/

https://reviews.llvm.org/D133667



More information about the llvm-commits mailing list