aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/non-lazy-bind.ll
blob: f72965877ddb36649f4322232e278763b034fb90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
; RUN: llc -mtriple=x86_64-apple-darwin < %s | FileCheck %s

declare void @lazy() nonlazybind
declare void @not()

; CHECK: foo:
; CHECK:  callq _not
; CHECK:  callq *_lazy@GOTPCREL(%rip)
define void @foo() nounwind {
  call void @not()
  call void @lazy()
  ret void
}

; CHECK: tail_call_regular:
; CHECK:   jmp _not
define void @tail_call_regular() nounwind {
  tail call void @not()
  ret void
}

; CHECK: tail_call_eager:
; CHECK:   jmpq *_lazy@GOTPCREL(%rip)
define void @tail_call_eager() nounwind {
  tail call void @lazy()
  ret void
}