[PATCH] D103340: [LoopUnroll] Use changeToUnreachable()

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 28 14:16:44 PDT 2021


reames accepted this revision.
reames added a comment.
This revision is now accepted and ready to land.

I have two concerns with this patch.

1. This is moving the code from before the dom tree rewrite to after.  Is the dom tree rewrite correct with the changed CFG?  From what I can tell, it is, but critical thought here is warranted.
2. Previously a throwing instruction in the last latch block was left in place.  If we ever had a case where we computed a trap count from a known throwing instruction, the new behavior is different than the old behavior.  I don't know of anything which does this, but I think I'd prefer to be conservative here.

LGTM w/the unreachable moved to the end of the latch block.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D103340



More information about the llvm-commits mailing list