xref: /llvm-project/llvm/test/Transforms/LoopDeletion/no-exit-blocks.ll (revision 4931cacb9778bde3d8d2e04575ac162bb090d6be)
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes
2; RUN: opt < %s -passes=loop-deletion -S | FileCheck %s
3
4define void @f() #0 {
5; CHECK: Function Attrs: mustprogress
6; CHECK-LABEL: define {{[^@]+}}@f
7; CHECK-SAME: () [[ATTR0:#.*]] {
8; CHECK-NEXT:    unreachable
9;
10  br label %1
11
12  %.01 = phi i32 [ 1, %0 ], [ %3, %2 ]
13  %.0 = phi i32 [ 1, %0 ], [ %3, %2 ]
14  br label %2
15
16  %3 = add nsw i32 %.01, %.0
17  br label %1
18}
19
20attributes #0 = { mustprogress }
21