[InstCombine] Add new rule for MIN(MAX(~A, ~B), ~C) et. al.
authorSanjoy Das <sanjoy@playingwithpointers.com>
Thu, 30 Apr 2015 04:56:04 +0000 (04:56 +0000)
committerSanjoy Das <sanjoy@playingwithpointers.com>
Thu, 30 Apr 2015 04:56:04 +0000 (04:56 +0000)
commita34038226ea16d5bb73fc3c0eb0281f6882c34cb
tree0a11816bc400547e5dc2ece11fc7cb771c88cde6
parentc0730628a4956986bda54f99da21590cb6ad33ce
[InstCombine] Add new rule for MIN(MAX(~A, ~B), ~C) et. al.

Summary:
Optimizing these well are especially interesting for IRCE since it
"clamps" values by generating this sort of pattern through SCEV
expressions.

Depends on D9352.

Reviewers: majnemer

Subscribers: llvm-commits

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

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