[PATCH] D87344: [IndVars] Remove exiting conditions that are trivially true/false

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 28 09:52:07 PDT 2020


nikic added a comment.

What is the relationship between this code and `SimplifyIndvar::eliminateIVComparison()`? Is this basically the same thing, just for icmps against something other than the IV itself?

If I'm understanding this correctly, this optimization doesn't really seem to be related to loop exits and could apply to any icmp in the loop. Looking at it in terms of a loop exit seems to make the logic more complicated (e.g. the double inversion of the predicate).


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

https://reviews.llvm.org/D87344



More information about the llvm-commits mailing list