[SCEV] Opportunistically interpret unsigned constraints as signed
authorSanjoy Das <sanjoy@playingwithpointers.com>
Thu, 22 Oct 2015 19:57:34 +0000 (19:57 +0000)
committerSanjoy Das <sanjoy@playingwithpointers.com>
Thu, 22 Oct 2015 19:57:34 +0000 (19:57 +0000)
commitb9d057df5ce39af68f9a66143b3050ff855e6d62
tree381aef0d76f6cb0a68f0de353a59dcbac1ac3ac4
parent47b5845e3b56a389239d9b0f4a7ccb8eea0ce52c
[SCEV] Opportunistically interpret unsigned constraints as signed

Summary:
An unsigned comparision is equivalent to is corresponding signed version
if both the operands being compared are positive.  Teach SCEV to use
this fact when profitable.

Reviewers: atrick, hfinkel, reames, nlewycky

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251051 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/InstrTypes.h
lib/Analysis/ScalarEvolution.cpp
lib/IR/Instructions.cpp
test/Transforms/IndVarSimplify/eliminate-comparison.ll