[PATCH] D71563: [SCEV] Recognise the hardwareloop "loop.decrement.reg" intrinsic

Sjoerd Meijer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 17 03:47:50 PST 2019


SjoerdMeijer added a comment.

Thanks again for sharing your thoughts and comments. I've done a bit of my homework:

> LFTR is quite picky, it only handles add/sub/getelementptr instructions in the addrec. So at least that particular case shouldn't pose a problem.

That's one way of phrasing it :-) The other way is that LFTR analyses expressions, and gracelessly bails if it doesn't understand the expression. So yes, I also don't see a problem here.

> I think the right mental model is that SCEV's users can rewrite the loop exit condition in arbitrary ways once SCEV can "understand" it. It may not be so bad in practice, but this is how I think about it.

Yep, got it, cheers.

What do we think? Is this something we could add to SCEV?
If there are more places to investigate or change, I am of course more than willing to do this.


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

https://reviews.llvm.org/D71563





More information about the llvm-commits mailing list