[SCEV] Make isImpliedCond smarter.
authorSanjoy Das <sanjoy@playingwithpointers.com>
Wed, 18 Mar 2015 00:41:29 +0000 (00:41 +0000)
committerSanjoy Das <sanjoy@playingwithpointers.com>
Wed, 18 Mar 2015 00:41:29 +0000 (00:41 +0000)
commite027d74733de7dc086c9d2190d14884e9240ce89
tree7c48dc39fcdf48567f967290f0f4a2de11be999d
parentda5f3a3ca5bc534592535d02b2289845461f33db
[SCEV] Make isImpliedCond smarter.

Summary:
This change teaches isImpliedCond to infer things like "X sgt 0" => "X -
1 sgt -1".  The `ConstantRange` class has the logic to do the heavy
lifting, this change simply gets ScalarEvolution to exploit that when
reasonable.

Depends on D8345

Reviewers: atrick

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232576 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/ScalarEvolution.h
lib/Analysis/ScalarEvolution.cpp
test/Analysis/ScalarEvolution/infer-via-ranges.ll [new file with mode: 0644]