[PATCH] D106852: [SCEV] Fix getAddExpr for adding loop invariants into start of some AddRec

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 1 21:46:37 PDT 2021


mkazantsev added a comment.

I think that the first version of this patch was better. The only problem that was confusing is naming. In fact, `is0thIterationGuaranteed` should be `is0thIterationDominatedByThis`. It is totally fine if the 0th iteration of outer loop does not happen (because of abnormal exit or whatsoever). The important bit that it cannot happen withou execution of the given Add. And therefore the no-wrap flags on the addrec may be inferred from the fact that this add has executed.

I suggest returning the initial solution with this renaming.

@efriedma WDYT?


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

https://reviews.llvm.org/D106852



More information about the llvm-commits mailing list