[PATCH] D101174: [IRCE] Relieve bound check on isSafeIncreasingBound and isSafeDecreasingBound

JinGu Kang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 26 04:58:39 PDT 2021


jaykang10 added a comment.

In D101174#2716329 <https://reviews.llvm.org/D101174#2716329>, @samparker wrote:

> Hi,
>
> I think this looks fine to me, and now I'm trying to remember what the difference was which these functions and cannotBe[Min/Max]InLoop. Have you looked into using these?

Hi Sam,

For increasing, it looked the `cannotBeMinInLoop` checks `bound > min` and `isSafeIncreasingBound` checks `start < bound < limit`.

For Decreasing, the `cannotBeMaxInLoop` checks `bound < max` and `isSafeDecreasingBound` checks ` limit < bound < start`.

They check different thing such as lower bound/upper bound and vice versa.

I thought it is ok to keep the two functions.

If I missed something, please let me know.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101174/new/

https://reviews.llvm.org/D101174



More information about the llvm-commits mailing list