1 ; RUN: llc %s -O2 -print-after-isel -mtriple=aarch64-linux-gnu -jump-table-density=40 -min-jump-table-entries=0 -o /dev/null 2> %t; FileCheck %s --check-prefixes=CHECK,CHECK0 < %t
2 ; RUN: llc %s -O2 -print-after-isel -mtriple=aarch64-linux-gnu -jump-table-density=40 -min-jump-table-entries=2 -o /dev/null 2> %t; FileCheck %s --check-prefixes=CHECK,CHECK2 < %t
3 ; RUN: llc %s -O2 -print-after-isel -mtriple=aarch64-linux-gnu -jump-table-density=40 -min-jump-table-entries=4 -o /dev/null 2> %t; FileCheck %s --check-prefixes=CHECK,CHECK4 < %t
4 ; RUN: llc %s -O2 -print-after-isel -mtriple=aarch64-linux-gnu -jump-table-density=40 -min-jump-table-entries=8 -o /dev/null 2> %t; FileCheck %s --check-prefixes=CHECK,CHECK8 < %t
6 declare void @ext(i32, i32)
8 define i32 @jt2(i32 %a, i32 %b) {
10 switch i32 %a, label %return [
14 ; CHECK-LABEL: function jt2:
15 ; CHECK0-NEXT: Jump Tables:
16 ; CHECK2-NEXT: Jump Tables:
17 ; CHECK4-NOT: {{^}}Jump Tables:
18 ; CHECK8-NOT: {{^}}Jump Tables:
20 bb1: tail call void @ext(i32 1, i32 0) br label %return
21 bb2: tail call void @ext(i32 2, i32 2) br label %return
26 define i32 @jt4(i32 %a, i32 %b) {
28 switch i32 %a, label %return [
34 ; CHECK-LABEL: function jt4:
35 ; CHECK0-NEXT: Jump Tables:
36 ; CHECK2-NEXT: Jump Tables:
37 ; CHECK4-NEXT: Jump Tables:
38 ; CHECK8-NOT: {{^}}Jump Tables:
40 bb1: tail call void @ext(i32 1, i32 0) br label %return
41 bb2: tail call void @ext(i32 3, i32 2) br label %return
42 bb3: tail call void @ext(i32 4, i32 4) br label %return
43 bb4: tail call void @ext(i32 5, i32 6) br label %return
48 define i32 @jt8(i32 %a, i32 %b) {
50 switch i32 %a, label %return [
60 ; CHECK-LABEL: function jt8:
61 ; CHECK-NEXT: Jump Tables:
63 bb1: tail call void @ext(i32 1, i32 0) br label %return
64 bb2: tail call void @ext(i32 2, i32 2) br label %return
65 bb3: tail call void @ext(i32 3, i32 4) br label %return
66 bb4: tail call void @ext(i32 4, i32 6) br label %return
67 bb5: tail call void @ext(i32 5, i32 8) br label %return
68 bb6: tail call void @ext(i32 6, i32 10) br label %return
69 bb7: tail call void @ext(i32 7, i32 12) br label %return
70 bb8: tail call void @ext(i32 8, i32 14) br label %return