[PATCH] D71561: [InstCombine] `select + mul` -> `select + shl` with power of 2s.

Danila Kutenin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 16 11:49:13 PST 2019


danlark created this revision.
danlark added a reviewer: spatel.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
danlark edited the summary of this revision.

Now select + mul transforms to select + shl with power of 2s known in select. It was implemented in udiv but was missed for multiplication for some reason, unifying and applying.

Patch by Danila Kutenin. email:danilak at google.com, github:danlark1@


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D71561

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71561.234114.patch
Type: text/x-patch
Size: 20695 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191216/012ad617/attachment.bin>


More information about the llvm-commits mailing list