1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -passes=loop-deletion -verify-loop-info -S | FileCheck %s
4 target triple = "x86_64-unknown-linux-gnu"
6 @G = external global i32
8 define void @func_1() {
9 ; CHECK-LABEL: @func_1(
11 ; CHECK-NEXT: br label [[LBL_2368:%.*]]
13 ; CHECK-NEXT: [[CMP289:%.*]] = icmp slt i32 undef, -5
14 ; CHECK-NEXT: br i1 [[CMP289]], label [[CLEANUP967:%.*]], label [[UNREACHABLE:%.*]]
16 ; CHECK-NEXT: switch i32 undef, label [[CLEANUP1169:%.*]] [
17 ; CHECK-NEXT: i32 20, label [[CLEANUP967_LBL_2368_CRIT_EDGE:%.*]]
19 ; CHECK: cleanup967.lbl_2368_crit_edge:
20 ; CHECK-NEXT: unreachable
22 ; CHECK-NEXT: ret void
24 ; CHECK-NEXT: unreachable
30 %cmp289 = icmp slt i32 undef, -5
31 br i1 %cmp289, label %cleanup967, label %unreachable
34 switch i32 undef, label %cleanup1169 [
35 i32 20, label %lbl_2368
45 define void @func_2() {
46 ; CHECK-LABEL: @func_2(
48 ; CHECK-NEXT: br label [[LBL_2368:%.*]]
50 ; CHECK-NEXT: br i1 false, label [[CLEANUP967:%.*]], label [[UNREACHABLE:%.*]]
52 ; CHECK-NEXT: switch i32 undef, label [[CLEANUP1169:%.*]] [
53 ; CHECK-NEXT: i32 20, label [[CLEANUP967_LBL_2368_CRIT_EDGE:%.*]]
55 ; CHECK: cleanup967.lbl_2368_crit_edge:
56 ; CHECK-NEXT: unreachable
58 ; CHECK-NEXT: ret void
60 ; CHECK-NEXT: unreachable
66 br i1 false, label %cleanup967, label %unreachable
69 switch i32 undef, label %cleanup1169 [
70 i32 20, label %lbl_2368