Skip to content
Commit fda3243f authored by Roman Lebedev's avatar Roman Lebedev
Browse files

[LoopIdiom] BCmp: check, not assert that loop exits exit out of the loop (PR43687)

We can't normally stumble into that assertion because a tautological
*conditional* `br` in loop body is required, one that always
branches to loop latch. But that should have been always folded
to an unconditional branch before we get it.
But that is not guaranteed if the pass is run standalone.
So let's just promote the assertion into a proper check.

Fixes https://bugs.llvm.org/show_bug.cgi?id=43687

llvm-svn: 375100
parent a867cca0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment