1 ; 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 13 define void @bar(i8* %h, void (i8*)* nocapture %foo) nounwind { 14 entry: 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 } 22