[PATCH] D142901: [InstSimplify] Simplify UREM and SREM left shifted operands

Matt Devereau via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 30 08:24:32 PST 2023


MattDevereau created this revision.
MattDevereau added reviewers: sdesmalen, peterwaller-arm, david-arm, spatel.
Herald added subscribers: StephenFan, hiraditya.
Herald added a project: All.
MattDevereau requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

If both operands of a rem instruction are left shifts of the same value, this can be simplified to 0 or the first operand


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D142901

Files:
  llvm/lib/Analysis/InstructionSimplify.cpp
  llvm/test/Transforms/InstSimplify/rem.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142901.493321.patch
Type: text/x-patch
Size: 4046 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230130/7b9b2cfd/attachment.bin>


More information about the llvm-commits mailing list