1 ; RUN: llc < %s -mtriple=i686-linux-gnu -mcpu=pentium | FileCheck %s
3 ; Tail call should not make register allocation fail (x86-32)
5 %struct.anon = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr }
6 %struct.BIG_PARM = type { i32 }
8 @vtable = internal unnamed_addr constant [1 x %struct.anon] [%struct.anon { ptr inttoptr (i32 -559038737 to ptr), ptr null, ptr null, ptr null, ptr null, ptr null, ptr null }], align 4
10 ; Function Attrs: nounwind uwtable
11 define dso_local i32 @something(ptr inreg noundef %a, ptr inreg noundef %b) local_unnamed_addr #0 {
13 ; CHECK: movl (%eax), %ecx
14 ; CHECK-NEXT: leal (%ecx,%ecx,8), %esi
15 ; CHECK-NEXT: leal (%esi,%esi,2), %esi
16 ; CHECK-NEXT: movl vtable(%ecx,%esi), %ecx
17 ; CHECK-NEXT: popl %esi
19 %0 = load i32, ptr %a, align 4
20 %foo = getelementptr [1 x %struct.anon], ptr @vtable, i32 0, i32 %0, i32 0
21 %1 = load ptr, ptr %foo, align 4
22 %call = tail call i32 %1(ptr inreg noundef %a, ptr inreg noundef %b) #1
26 !llvm.module.flags = !{!0}
28 !0 = !{i32 1, !"NumRegisterParameters", i32 3}