[PATCH] D65336: [InstSimplify] remove quadratic time looping (PR42771)

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 26 09:23:28 PDT 2019


spatel added a comment.

In D65336#1602727 <https://reviews.llvm.org/D65336#1602727>, @foad wrote:

> > There's a test diff here for a degenerate case with llvm.assume that I didn't step through, but I think that's caused because isInstructionTriviallyDead() may not be true for a function call even if that call has no uses.
>
> The old code would visit %cond1, notice the @llvm.assume, record an assumption that %x==3, and then (because of the "When instructions get deleted re-iterate instead" case) *revisit* the %add and find that it can now be simplified using the assumption. I don't know how important it is to preserve this kind of behaviour.


It's not important IMO. That test has conflicting assumptions, so we're really just making sure we don't crash. If we're still propagating info from legitimate assumptions, we should be fine.


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

https://reviews.llvm.org/D65336





More information about the llvm-commits mailing list