[PATCH] D130103: [InstCombine] Add mul with negated power of 2 constant to canEvaluateShifted.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 20 10:17:23 PDT 2022


craig.topper updated this revision to Diff 446200.
craig.topper added a comment.

-Add assert for !isLeftShift. Checking the constant would require calling match with m_APInt that we don't otherwise need.
-Add negative test with additional use of mul.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D130103

Files:
  llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp
  llvm/test/Transforms/InstCombine/apint-shift.ll
  llvm/test/Transforms/InstCombine/shift.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D130103.446200.patch
Type: text/x-patch
Size: 5059 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220720/ec65747c/attachment-0001.bin>


More information about the llvm-commits mailing list