[PATCH] D144861: [SCEV][IndVars][WIP] Check outer loop invariant when cononicalize comparision

luxufan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 1 05:04:04 PST 2023


StephenFan added a comment.

> In D144861#4160432 <https://reviews.llvm.org/D144861#4160432>, @StephenFan wrote:
>
>>> ! In D144861#4160179 <https://reviews.llvm.org/D144861#4160179>, @efriedma wrote:
>>>  From my analysis of the testcase, we called "getAddExpr(SCEV::FlagNUW)" while analyzing the first loop, and that broke the analysis of the second loop.  The actual simplification isn't relevant.
>>
>> Sorry, I don't know what you mean by "The actual simplification isn't relevant". Would you mind explaining a little more?
>
> The getAddExpr() with NUW flag sets this flag globally, for all uses of this add. The icmp simplification itself doesn't make a difference, just the side effect that the (not globally correct) nuw flag is set.

Thanks for your explanation!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D144861



More information about the llvm-commits mailing list