[PATCH] D39240: Improve clamp recognition in ValueTracking.

Artur Gainullin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 24 06:52:23 PDT 2017


ArturGainullin created this revision.
Herald added a subscriber: jholewinski.

ValueTracking was recognizing not all variations of clamp. Swapping of
true value and false value of select was added to fix this problem. We
break canonical form only for clamp pattern recognition. The first patch
was reverted because it caused miscompile in NVPTX target. Added
corresponding test cases.


https://reviews.llvm.org/D39240

Files:
  lib/Analysis/ValueTracking.cpp
  test/CodeGen/NVPTX/minmax-negative.ll
  test/Transforms/InstCombine/minmax-fold.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39240.120069.patch
Type: text/x-patch
Size: 6076 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171024/f9a007c3/attachment.bin>


More information about the llvm-commits mailing list