[SCEV] accurate range for addrecexpr with nuw flag
authorZheng Chen <czhengsz@cn.ibm.com>
Mon, 13 Jan 2020 01:22:37 +0000 (20:22 -0500)
committerZheng Chen <czhengsz@cn.ibm.com>
Mon, 13 Jan 2020 01:22:37 +0000 (20:22 -0500)
commita6342c247a17fb270e0385bd1deb463b7309a43b
treec2c4b563332cc6b078a479dc807abb450650c9e4
parent0113cf193f0610bb1a5dfa0bcd29c41a8965938a
[SCEV] accurate range for addrecexpr with nuw flag

If addrecexpr has nuw flag, the value should never be less than its
start value and start value does not required to be SCEVConstant.

Reviewed By: nikic, sanjoy

Differential Revision: https://reviews.llvm.org/D71690
llvm/lib/Analysis/ScalarEvolution.cpp
llvm/test/Analysis/ScalarEvolution/range_nw_flag.ll