summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/pic-3.ll
blob: 245cae8537cfeead60f189c8c2056247373bbcc0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | FileCheck %s

; CHECK: bar:
; CHECK: call	.Lllvm$1.$piclabel
; CHECK: popl	%ebx
; CHECK: addl	$_GLOBAL_OFFSET_TABLE_ + [.-.Lllvm$1.$piclabel], %ebx
; CHECK: call	foo@PLT


define void @bar() nounwind {
entry:
    call void(...)* @foo()
    br label %return
return:
    ret void
}

declare void @foo(...)