It is possible that loop exit has two predecessors in a loop body.
In this case after the peeling the iDom of the exit should be a clone of
iDom of original exit but no a clone of a block coming to this exit.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
LGTM. An alternate implementation would be to require that each exit has one predecessor in the legality for peeling check. Either would be fine, and if you want to do the alternate, you can land that without review..
llvm/lib/Transforms/Utils/LoopUnrollPeel.cpp | ||
---|---|---|
588 ↗ | (On Diff #209428) | Please add an assert that L has dedicated exits, because that's the precondition for your dominance fact. |
llvm/lib/Transforms/Utils/LoopUnrollPeel.cpp | ||
---|---|---|
588 ↗ | (On Diff #209428) | In the beginning of this method we have an assert that we canPeel which returns true only if loop is in simplify form what includes the check that all exits are dedicated. It is to far so I'm ok to add an assert here as well. |