This also means we have to check if the latch is the exiting block now, as transform expects the latches to be the exiting blocks too.
Details
Diff Detail
Event Timeline
Thank you very much for having a look Eli and sorry for the delay, I needed to find some time to investigate another failure in the test suite with this change. Together with D45970 and this patch, building the test-suite with LoopInterchange + LTO passes.
I've updated the code to make sure the exiting's block's terminator is a branch instruction.
lib/Transforms/Scalar/LoopInterchange.cpp | ||
---|---|---|
562 | What is this closing brace doing here? Also, the indentation looks weird. | |
865 | processLoopList contains an identical check. And I think OuterLoop->getExitingBlock() == OuterLoop->getLoopLatch() && isa<BranchInst>(OuterLoop->getLoopLatch()->getTerminator()) implies the exit is unique. |
lib/Transforms/Scalar/LoopInterchange.cpp | ||
---|---|---|
562 | Argh, sorry about that. Should be fixed now | |
865 | There's one check to ensure the outermost loop in a nest has a unique exit block in processLoopList. Ah yes, the check Latch == single exiting block & isa<BranchInst> should guarantee that we have a unique exit block, thanks! |
What is this closing brace doing here?
Also, the indentation looks weird.