[PATCH] D45374: [LoopUnroll] Limit peeling to conds in BBs executed on every iteration.

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 9 02:23:52 PDT 2018


mkazantsev added a comment.

I also don't get it. If peeling can help to deal with a comparison like this

  b = -1;
  for (i = 0; i < N; i++) {
    if (something) {
      if (b > 0) break;
    }
    b = i;
  }

Here `b > 0` does not dominate the latch, but it is still profitable to peel away 1 iteration to get rid of it.


https://reviews.llvm.org/D45374





More information about the llvm-commits mailing list