diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2015-01-18 16:17:27 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2015-01-18 16:17:27 +0000 |
commit | 67c32a98315f785a9ec9d531c1f571a0196c7463 (patch) | |
tree | 4abb9cbeecc7901726dd0b4a37369596c852e9ef /test/CodeGen/X86/x32-function_pointer-1.ll | |
parent | 9f61947910e6ab40de38e6b4034751ef1513200f (diff) |
Diffstat (limited to 'test/CodeGen/X86/x32-function_pointer-1.ll')
-rw-r--r-- | test/CodeGen/X86/x32-function_pointer-1.ll | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/CodeGen/X86/x32-function_pointer-1.ll b/test/CodeGen/X86/x32-function_pointer-1.ll new file mode 100644 index 0000000000000..2baf92a99790d --- /dev/null +++ b/test/CodeGen/X86/x32-function_pointer-1.ll @@ -0,0 +1,20 @@ +; RUN: llc < %s -mtriple=x86_64-linux-gnux32 | FileCheck %s +; RUN: llc < %s -mtriple=x86_64-linux-gnux32 -fast-isel | FileCheck %s + +; Test for x32 function pointer tail call + +@foo1 = external global void (i8*)* +@foo2 = external global void (i8*)* + +define void @bar(i8* %h) nounwind uwtable { +entry: + %0 = load void (i8*)** @foo1, align 4 +; CHECK: movl foo1(%rip), %e{{[^,]*}} + tail call void %0(i8* %h) nounwind +; CHECK: callq *%r{{[^,]*}} + %1 = load void (i8*)** @foo2, align 4 +; CHECK: movl foo2(%rip), %e{{[^,]*}} + tail call void %1(i8* %h) nounwind +; CHECK: jmpq *%r{{[^,]*}} + ret void +} |