[IRCE] Enable increasing loops of variable bounds
    
CanBeMin is currently used which will report true for any unknown
values, but often a check is performed outside the loop which covers
this situation:
    
for (int i = 0; i < N; ++i)
  ...
    
if (N > 0)
  for (int i = 0; i < N; ++i)
    ...
    
So I've add 'LoopGuardedAgainstMin' which reports whether N is
greater than the minimum value which then allows loop with a variable
loop count to be optimised. I've also moved the increasing bound
checking into its own function and replaced SumCanReachMax is another
isLoopEntryGuardedByCond function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328480 91177308-0d34-0410-b5e6-96231b3b80d8
3 files changed