[PATCH] D99912: Look through invertible recurrences in isKnownNonEqual

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 14 13:50:28 PDT 2021


nikic added a comment.

In D99912#2689731 <https://reviews.llvm.org/D99912#2689731>, @nikic wrote:

> I think you're missing an important precondition here: You need that `Step1 == Step2`. Otherwise you could have `<0,+,2>` and `<1,+,1>`, which have non-equal start values, but are still equal on the second iteration.

Ah no, getInvertibleOperand() would fail if the steps didn't match. I think your code is correct, it's just missing test coverage for this case.


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

https://reviews.llvm.org/D99912



More information about the llvm-commits mailing list