Changeset View
Changeset View
Standalone View
Standalone View
llvm/test/Transforms/LoopDeletion/no-exit-blocks.ll
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes | ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes | ||||
; RUN: opt < %s -loop-deletion -S | FileCheck %s | ; RUN: opt < %s -loop-deletion -S | FileCheck %s | ||||
define void @f() #0 { | define void @f() #0 { | ||||
; CHECK: Function Attrs: mustprogress | ; CHECK: Function Attrs: mustprogress | ||||
; CHECK-LABEL: define {{[^@]+}}@f | ; CHECK-LABEL: define {{[^@]+}}@f | ||||
; CHECK-SAME: () [[ATTR0:#.*]] { | ; CHECK-SAME: () [[ATTR0:#.*]] { | ||||
; CHECK-NEXT: br label [[TMP1:%.*]] | ; CHECK-NEXT: unreachable | ||||
; CHECK: 1: | |||||
; CHECK-NEXT: [[DOT01:%.*]] = phi i32 [ 1, [[TMP0:%.*]] ], [ [[TMP3:%.*]], [[TMP2:%.*]] ] | |||||
; CHECK-NEXT: [[DOT0:%.*]] = phi i32 [ 1, [[TMP0]] ], [ [[TMP3]], [[TMP2]] ] | |||||
; CHECK-NEXT: br label [[TMP2]] | |||||
; CHECK: 2: | |||||
; CHECK-NEXT: [[TMP3]] = add nsw i32 [[DOT01]], [[DOT0]] | |||||
; CHECK-NEXT: br label [[TMP1]] | |||||
; | ; | ||||
br label %1 | br label %1 | ||||
%.01 = phi i32 [ 1, %0 ], [ %3, %2 ] | %.01 = phi i32 [ 1, %0 ], [ %3, %2 ] | ||||
%.0 = phi i32 [ 1, %0 ], [ %3, %2 ] | %.0 = phi i32 [ 1, %0 ], [ %3, %2 ] | ||||
br label %2 | br label %2 | ||||
%3 = add nsw i32 %.01, %.0 | %3 = add nsw i32 %.01, %.0 | ||||
br label %1 | br label %1 | ||||
} | } | ||||
attributes #0 = { mustprogress } | attributes #0 = { mustprogress } |