[InstCombine] Add a new formula for SMIN.
authorSanjoy Das <sanjoy@playingwithpointers.com>
Thu, 30 Apr 2015 04:56:00 +0000 (04:56 +0000)
committerSanjoy Das <sanjoy@playingwithpointers.com>
Thu, 30 Apr 2015 04:56:00 +0000 (04:56 +0000)
commitc0730628a4956986bda54f99da21590cb6ad33ce
treefd20bd3ad4f885c2b5f88eb1a5675e39d2a01767
parentdeedba2a369a693905c467b805449a3109fca6c7
[InstCombine] Add a new formula for SMIN.

Summary:
After this change `MatchSelectPattern` recognizes the following form
of SMIN:

  Y >s C ? ~Y : ~C == ~Y <s ~C ? ~Y : ~C = SMIN(~Y, ~C)

Reviewers: majnemer

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D9352

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236202 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombineSelect.cpp
test/Transforms/InstCombine/select.ll