[PATCH] D54274: Constant folding and instcombine for saturating subs

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 9 02:39:36 PST 2018


nikic updated this revision to Diff 173290.
nikic edited the summary of this revision.
nikic added a comment.

Simplify sat(X - undef) -> X for symmetry with the add simplification.


https://reviews.llvm.org/D54274

Files:
  include/llvm/ADT/APInt.h
  lib/Analysis/ConstantFolding.cpp
  lib/Analysis/InstructionSimplify.cpp
  lib/Analysis/ValueTracking.cpp
  lib/Support/APInt.cpp
  lib/Transforms/InstCombine/InstCombineCalls.cpp
  test/Transforms/InstCombine/saturating-sub.ll
  unittests/ADT/APIntTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54274.173290.patch
Type: text/x-patch
Size: 15408 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181109/050670bc/attachment.bin>


More information about the llvm-commits mailing list