commit | 574e01c32e14fc13db509b47fd01b8890cc0cdeb | [log] [tgz] |
---|---|---|
author | Sanjoy Das <sanjoy@playingwithpointers.com> | Mon Dec 15 22:50:15 2014 +0000 |
committer | Sanjoy Das <sanjoy@playingwithpointers.com> | Mon Dec 15 22:50:15 2014 +0000 |
tree | b88f74d3fdcd0e20a9c67bd70ac90c1406c3e530 | |
parent | 2f7e202f2779bd4ed665abbf8c9537fb43329536 [diff] |
Teach ScalarEvolution to exploit min and max expressions when proving isKnownPredicate. The motivation for this change is to optimize away checks in loops like this: limit = min(t, len) for (i = 0 to limit) if (i >= len || i < 0) throw_array_of_of_bounds(); a[i] = ... Differential Revision: http://reviews.llvm.org/D6635 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224285 91177308-0d34-0410-b5e6-96231b3b80d8