1 ; FIXME: Fix machine verifier issues and remove -verify-machineinstrs=0. PR39436.
2 ; RUN: llc -mtriple=x86_64-unknown-linux -verify-machineinstrs=0 < %s | FileCheck %s
4 @g = external global i8
17 declare void @llvm.icall.branch.funnel(...)
19 define void @jt2(i8* nest, ...) {
21 ; CHECK: leaq g+1(%rip), %r11
22 ; CHECK-NEXT: cmpq %r11, %r10
23 ; CHECK-NEXT: jae .LBB0_1
26 ; CHECK-NEXT: .LBB0_1:
28 musttail call void (...) @llvm.icall.branch.funnel(
30 i8* getelementptr (i8, i8* @g, i64 0), void ()* @f0,
31 i8* getelementptr (i8, i8* @g, i64 1), void ()* @f1,
37 define void @jt3(i8* nest, ...) {
39 ; CHECK: leaq g+1(%rip), %r11
40 ; CHECK-NEXT: cmpq %r11, %r10
41 ; CHECK-NEXT: jae .LBB1_1
44 ; CHECK-NEXT: .LBB1_1:
45 ; CHECK-NEXT: jne .LBB1_2
48 ; CHECK-NEXT: .LBB1_2:
50 musttail call void (...) @llvm.icall.branch.funnel(
52 i8* getelementptr (i8, i8* @g, i64 0), void ()* @f0,
53 i8* getelementptr (i8, i8* @g, i64 2), void ()* @f2,
54 i8* getelementptr (i8, i8* @g, i64 1), void ()* @f1,
60 define void @jt7(i8* nest, ...) {
62 ; CHECK: leaq g+3(%rip), %r11
63 ; CHECK-NEXT: cmpq %r11, %r10
64 ; CHECK-NEXT: jae .LBB2_1
66 ; CHECK-NEXT: leaq g+1(%rip), %r11
67 ; CHECK-NEXT: cmpq %r11, %r10
68 ; CHECK-NEXT: jae .LBB2_6
71 ; CHECK-NEXT: .LBB2_1:
72 ; CHECK-NEXT: jne .LBB2_2
75 ; CHECK-NEXT: .LBB2_6:
76 ; CHECK-NEXT: jne .LBB2_7
79 ; CHECK-NEXT: .LBB2_2:
80 ; CHECK-NEXT: leaq g+5(%rip), %r11
81 ; CHECK-NEXT: cmpq %r11, %r10
82 ; CHECK-NEXT: jae .LBB2_3
85 ; CHECK-NEXT: .LBB2_7:
87 ; CHECK-NEXT: .LBB2_3:
88 ; CHECK-NEXT: jne .LBB2_4
91 ; CHECK-NEXT: .LBB2_4:
93 musttail call void (...) @llvm.icall.branch.funnel(
95 i8* getelementptr (i8, i8* @g, i64 0), void ()* @f0,
96 i8* getelementptr (i8, i8* @g, i64 1), void ()* @f1,
97 i8* getelementptr (i8, i8* @g, i64 2), void ()* @f2,
98 i8* getelementptr (i8, i8* @g, i64 3), void ()* @f3,
99 i8* getelementptr (i8, i8* @g, i64 4), void ()* @f4,
100 i8* getelementptr (i8, i8* @g, i64 5), void ()* @f5,
101 i8* getelementptr (i8, i8* @g, i64 6), void ()* @f6,
107 define void @jt10(i8* nest, ...) {
109 ; CHECK: leaq g+5(%rip), %r11
110 ; CHECK-NEXT: cmpq %r11, %r10
111 ; CHECK-NEXT: jae .LBB3_1
113 ; CHECK-NEXT: leaq g+1(%rip), %r11
114 ; CHECK-NEXT: cmpq %r11, %r10
115 ; CHECK-NEXT: jae .LBB3_7
118 ; CHECK-NEXT: .LBB3_1:
119 ; CHECK-NEXT: jne .LBB3_2
122 ; CHECK-NEXT: .LBB3_7:
123 ; CHECK-NEXT: jne .LBB3_8
126 ; CHECK-NEXT: .LBB3_2:
127 ; CHECK-NEXT: leaq g+7(%rip), %r11
128 ; CHECK-NEXT: cmpq %r11, %r10
129 ; CHECK-NEXT: jae .LBB3_3
132 ; CHECK-NEXT: .LBB3_8:
133 ; CHECK-NEXT: leaq g+3(%rip), %r11
134 ; CHECK-NEXT: cmpq %r11, %r10
135 ; CHECK-NEXT: jae .LBB3_9
138 ; CHECK-NEXT: .LBB3_3:
139 ; CHECK-NEXT: jne .LBB3_4
142 ; CHECK-NEXT: .LBB3_9:
143 ; CHECK-NEXT: jne .LBB3_10
146 ; CHECK-NEXT: .LBB3_4:
147 ; CHECK-NEXT: leaq g+9(%rip), %r11
148 ; CHECK-NEXT: cmpq %r11, %r10
149 ; CHECK-NEXT: jae .LBB3_5
152 ; CHECK-NEXT: .LBB3_10:
154 ; CHECK-NEXT: .LBB3_5:
156 musttail call void (...) @llvm.icall.branch.funnel(
158 i8* getelementptr (i8, i8* @g, i64 0), void ()* @f0,
159 i8* getelementptr (i8, i8* @g, i64 1), void ()* @f1,
160 i8* getelementptr (i8, i8* @g, i64 2), void ()* @f2,
161 i8* getelementptr (i8, i8* @g, i64 3), void ()* @f3,
162 i8* getelementptr (i8, i8* @g, i64 4), void ()* @f4,
163 i8* getelementptr (i8, i8* @g, i64 5), void ()* @f5,
164 i8* getelementptr (i8, i8* @g, i64 6), void ()* @f6,
165 i8* getelementptr (i8, i8* @g, i64 7), void ()* @f7,
166 i8* getelementptr (i8, i8* @g, i64 8), void ()* @f8,
167 i8* getelementptr (i8, i8* @g, i64 9), void ()* @f9,