https://bugs.llvm.org/show_bug.cgi?id=50511
Bug ID: 50511
Summary: [LoopDeletion] Infinite loop removed without
mustprogress
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Scalar Optimizations
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
define void @test(i1 %c1, i1 %c2) {
br label %loop1
loop1:
br i1 %c1, label %loop1.latch, label %loop2
loop2:
br i1 %c2, label %loop1.latch, label %loop2
loop1.latch:
br i1 false, label %loop1, label %exit
exit:
ret void
}
opt -S -loop-deletion
define void @test(i1 %c1, i1 %c2) {
br label %exit
exit: ; preds = %0
ret void
}
Note that the original code goes into an infinite loop for %c1=false, %c2=false
and the function is not mustprogress.
While LoopDeletion makes sure that the loop has a finite trip count, it does
not account for an inner infinite loop.
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs