[PATCH] D48599: SCEVExpander::expandAddRecExprLiterally(): check before casting as Instruction

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 26 11:22:06 PDT 2018


lebedev.ri added a comment.

In https://reviews.llvm.org/D48597#1143719, @sanjoy wrote:

> In https://reviews.llvm.org/D48597#1143657, @lebedev.ri wrote:
>
> > In https://reviews.llvm.org/D48597#1143645, @sanjoy wrote:
> >
> > > IMO this doesn't seem like an invalidation bug -- SCEV Expander needs to be smarter about dealing with these kinds of simplifications.
> >
> >
> > Does this sound better?
>
>
> Yes -- that seems better to me.


BTW i think this is a wrong fix.
In this case, after `-loop-reduce` we still end up with the same output as the input, just slightly renamed, still with `%dec`.
So we can be doing `-indvars -loop-instsimplify -loop-reduce` any number of times, in an endless loop...


Repository:
  rL LLVM

https://reviews.llvm.org/D48599





More information about the llvm-commits mailing list