brintos

brintos / llvm-project-archived public Read only

0
0
Text · 495 B · 3369fbb Raw
22 lines · plain
1; RUN: llc < %s -mtriple=x86_64-linux-gnux32 | FileCheck %s2; RUN: llc < %s -mtriple=x86_64-linux-gnux32 -fast-isel | FileCheck %s3 4; Test call function pointer with function argument5;6; void bar (ptr h, void (*foo) (ptr))7;    {8;      foo (h);9;      foo (h);10;    }11 12 13define void @bar(ptr %h, ptr nocapture %foo) nounwind {14entry:15  tail call void %foo(ptr %h) nounwind16; CHECK: mov{{l|q}}	%{{e|r}}si,17; CHECK: callq	*%r18  tail call void %foo(ptr %h) nounwind19; CHECK: jmpq	*%r20  ret void21}22