1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=thumbv6m-none-unknown-eabi -tail-dup-placement-threshold=3 < %s | FileCheck %s
4 define hidden void @test() {
6 ; CHECK: @ %bb.0: @ %entry
7 ; CHECK-NEXT: movs r0, #1
8 ; CHECK-NEXT: lsls r1, r0, #2
9 ; CHECK-NEXT: b .LBB0_2
10 ; CHECK-NEXT: .LBB0_1: @ %bb2
11 ; CHECK-NEXT: @ in Loop: Header=BB0_2 Depth=1
12 ; CHECK-NEXT: cmp r0, #0
13 ; CHECK-NEXT: bne .LBB0_6
14 ; CHECK-NEXT: .LBB0_2: @ %switch
15 ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1
16 ; CHECK-NEXT: adr r2, .LJTI0_0
17 ; CHECK-NEXT: ldr r2, [r2, r1]
18 ; CHECK-NEXT: mov pc, r2
19 ; CHECK-NEXT: @ %bb.3:
20 ; CHECK-NEXT: .p2align 2
21 ; CHECK-NEXT: .LJTI0_0:
22 ; CHECK-NEXT: .long .LBB0_6+1
23 ; CHECK-NEXT: .long .LBB0_4+1
24 ; CHECK-NEXT: .long .LBB0_6+1
25 ; CHECK-NEXT: .long .LBB0_5+1
26 ; CHECK-NEXT: .LBB0_4: @ %switch
27 ; CHECK-NEXT: @ in Loop: Header=BB0_2 Depth=1
28 ; CHECK-NEXT: b .LBB0_1
29 ; CHECK-NEXT: .LBB0_5: @ %bb
30 ; CHECK-NEXT: @ in Loop: Header=BB0_2 Depth=1
31 ; CHECK-NEXT: cmp r0, #0
32 ; CHECK-NEXT: beq .LBB0_1
33 ; CHECK-NEXT: .LBB0_6: @ %dead
37 switch: ; preds = %bb2, %entry
38 switch i32 undef, label %dead2 [
45 dead: ; preds = %bb2, %bb, %switch, %switch
48 dead2: ; preds = %switch
52 br i1 undef, label %dead, label %bb2
54 bb2: ; preds = %bb, %switch
55 br i1 undef, label %dead, label %switch