[PATCH] D63993: [InstCombine] (Y + ~X) + 1 --> Y - X fold (PR42459)

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 1 06:55:21 PDT 2019


lebedev.ri updated this revision to Diff 207292.
lebedev.ri added a comment.

So apparently we were already handling the `(A + 1) + ~B` case,
but not this case with `+1` being the outer instruction..
Move the fold to the original fold.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D63993

Files:
  lib/Transforms/InstCombine/InstCombineAddSub.cpp
  test/Transforms/InstCombine/add.ll
  test/Transforms/InstCombine/fold-inc-of-add-of-not-x-and-y-to-sub-x-from-y.ll
  test/Transforms/InstCombine/sub-minmax.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D63993.207292.patch
Type: text/x-patch
Size: 7180 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190701/00536988/attachment.bin>


More information about the llvm-commits mailing list