Closed shao-hua-li closed 1 year ago
Reduced:
define void @test() {
entry:
br i1 false, label %loop2, label %loop1
loop1:
br label %loop2
loop2:
br i1 true, label %exit, label %loop1
exit:
call void @dummy()
ret void
}
declare void @dummy()
Presumably the LiveBlocks logic isn't correct for irreducable loops.
This is a recent regression. Clang at -O1 produces the wrong code.
Bisect to https://github.com/llvm/llvm-project/commit/ad7f02010f32bff28fec139e103ad0240e160aa9, which was committed by @nikic
Compiler explorer: https://godbolt.org/z/ze8b3KcKs