LoopVectorize - determine the bounds of the original loop

     Is there an easy way to obtain in the LoopVectorize module the upper and lower bounds of the loop being vectorized - I wasn't really able to find in the original code of LoopVectorize code calculating these bounds, although I know this module quite well and I am wondering if maybe they are already computed. (I put a similar question at http://lists.llvm.org/pipermail/llvm-dev/2016-August/103988.html ) .

     I have to admit I don't know well the ScalarEvolution class but I think I can also use ScalarEvolution's getUnsignedRangeMax() and getUnsignedRangeMin(), but these are newer methods added to ScalarEvolution in the last months and I normally work on an older LLVM trunk.

     Any help would be appreciated.

   Thank you,

Hi Alex,

Did you take a look at ScalarEvolution::getBackedgeTakenCount() ?

-- Sanjoy