1 ; RUN: llc %s -O2 -print-machineinstrs -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-machineinstrs -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
3 ; RUN: llc %s -O2 -print-machineinstrs -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
7 define i32 @jt2(i32 %a, i32 %b) {
9 switch i32 %a, label %return [
13 ; CHECK-LABEL: function jt2:
14 ; CHECK0-NEXT: Jump Tables:
15 ; CHECK0-NEXT: %jump-table.0:
16 ; CHECK0-NOT: %jump-table.1:
17 ; CHECK4-NOT: {{^}}Jump Tables:
18 ; CHECK8-NOT: {{^}}Jump Tables:
20 bb1: tail call void @ext(i32 0) br label %return
21 bb2: tail call void @ext(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 ; CHECK0-NEXT: %jump-table.0:
37 ; CHECK0-NOT: %jump-table.1:
38 ; CHECK4-NEXT: Jump Tables:
39 ; CHECK4-NEXT: %jump-table.0:
40 ; CHECK4-NOT: %jump-table.1:
41 ; CHECK8-NOT: {{^}}Jump Tables:
43 bb1: tail call void @ext(i32 0) br label %return
44 bb2: tail call void @ext(i32 2) br label %return
45 bb3: tail call void @ext(i32 4) br label %return
46 bb4: tail call void @ext(i32 6) br label %return
51 define i32 @jt8(i32 %a, i32 %b) {
53 switch i32 %a, label %return [
63 ; CHECK-LABEL: function jt8:
64 ; CHECK-NEXT: Jump Tables:
65 ; CHECK-NEXT: %jump-table.0:
66 ; CHECK-NOT: %jump-table.1:
68 bb1: tail call void @ext(i32 0) br label %return
69 bb2: tail call void @ext(i32 2) br label %return
70 bb3: tail call void @ext(i32 4) br label %return
71 bb4: tail call void @ext(i32 6) br label %return
72 bb5: tail call void @ext(i32 8) br label %return
73 bb6: tail call void @ext(i32 10) br label %return
74 bb7: tail call void @ext(i32 12) br label %return
75 bb8: tail call void @ext(i32 14) br label %return