[PATCH] D47041: [ValueTracking] Teach computeKnownBits that the result of an absolute value pattern that uses nsw flag is always positive.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 22 15:07:55 PDT 2018


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

Add a simple test case to show (abs(x)) > 0 is always true.


https://reviews.llvm.org/D47041

Files:
  lib/Analysis/ValueTracking.cpp
  lib/Transforms/InstCombine/InstCombineAddSub.cpp
  test/Transforms/InstCombine/abs-1.ll
  test/Transforms/InstCombine/abs_abs.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47041.148113.patch
Type: text/x-patch
Size: 4184 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180522/cd9ed3a8/attachment.bin>


More information about the llvm-commits mailing list