blob: f727d41be3a3729e8eef402967c3a4146db713e2 [file] [log] [blame]
Pavel Chupin37b65d82014-09-17 07:09:23 +00001; RUN: llc < %s -mtriple=x86_64-linux-gnux32 | FileCheck %s
2; RUN: llc < %s -mtriple=x86_64-linux-gnux32 -fast-isel | FileCheck %s
3
4; Test call function pointer with function argument
5;
6; void bar (void * h, void (*foo) (void *))
7; {
8; foo (h);
9; foo (h);
10; }
11
12
13define void @bar(i8* %h, void (i8*)* nocapture %foo) nounwind {
14entry:
15 tail call void %foo(i8* %h) nounwind
16; CHECK: mov{{l|q}} %{{e|r}}si, %{{e|r}}[[REG:.*]]{{d?}}
17; CHECK: callq *%r[[REG]]
18 tail call void %foo(i8* %h) nounwind
19; CHECK: jmpq *%r{{[^,]*}}
20 ret void
21}