1 ; RUN: llc < %s -mtriple=x86_64-linux-gnux32 | FileCheck %s
2 ; RUN: llc < %s -mtriple=x86_64-linux-gnux32 -fast-isel | FileCheck %s
4 ; Test for x32 function pointer tail call
6 @foo1 = external dso_local global ptr
7 @foo2 = external dso_local global ptr
9 define void @bar(ptr %h) nounwind uwtable {
11 %0 = load ptr, ptr @foo1, align 4
12 ; CHECK: movl foo1(%rip), %e{{[^,]*}}
13 tail call void %0(ptr %h) nounwind
14 ; CHECK: callq *%r{{[^,]*}}
15 %1 = load ptr, ptr @foo2, align 4
16 ; CHECK: movl foo2(%rip), %e{{[^,]*}}
17 tail call void %1(ptr %h) nounwind
18 ; CHECK: jmpq *%r{{[^,]*}}