[PATCH] D148609: [InstCombine] Fix buggy `(mul X, Y)` -> `(shl X, Log2(Y))` transform PR62175

Noah Goldstein via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 18 11:42:52 PDT 2023


goldstein.w.n updated this revision to Diff 514707.
goldstein.w.n marked 2 inline comments as done.
goldstein.w.n added a comment.

RequireNoOverflow -> AssumeNonZero + just use `nuw` for `1 << shl`


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D148609

Files:
  llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
  llvm/test/Transforms/InstCombine/mul-pow2.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148609.514707.patch
Type: text/x-patch
Size: 6796 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230418/17fa412f/attachment.bin>


More information about the llvm-commits mailing list