[PATCH] D45976: [InstCombine] Simplify Add with remainder expressions as operands.

Bixia Zheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 23 11:16:47 PDT 2018


bixia created this revision.
bixia added a reviewer: sanjoy.
Herald added a subscriber: jlebar.

Simplify integer add expression X % C0 + (( X / C0 ) % C1) * C0 to
X % (C0 * C1).
Add test cases for this new optimization.


Repository:
  rL LLVM

https://reviews.llvm.org/D45976

Files:
  lib/Transforms/InstCombine/InstCombineAddSub.cpp
  lib/Transforms/InstCombine/InstCombineInternal.h
  test/Transforms/InstCombine/add4.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45976.143604.patch
Type: text/x-patch
Size: 7331 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180423/9e4efed3/attachment.bin>


More information about the llvm-commits mailing list