[SCEV] Make isImpliedCondOperandsViaRanges smarter
authorSanjoy Das <sanjoy@playingwithpointers.com>
Sat, 23 Jul 2016 00:54:36 +0000 (00:54 +0000)
committerSanjoy Das <sanjoy@playingwithpointers.com>
Sat, 23 Jul 2016 00:54:36 +0000 (00:54 +0000)
commita7d9ec8751b1bb045f83934e9be202a191249db8
treeb07580b15999f9534793c29636d0934ca76bd3be
parent401d031e1e1741c586b46ecd749790e51dcbc8a0
[SCEV] Make isImpliedCondOperandsViaRanges smarter

This change lets us prove things like

  "{X,+,10} s< 5000" implies "{X+7,+,10} does not sign overflow"

It does this by replacing replacing getConstantDifference by
computeConstantDifference (which is smarter) in
isImpliedCondOperandsViaRanges.

llvm-svn: 276505
llvm/include/llvm/Analysis/ScalarEvolution.h
llvm/lib/Analysis/ScalarEvolution.cpp
llvm/test/Analysis/ScalarEvolution/no-wrap-unknown-becount.ll