2011-06-15 20:36:13 +00:00
|
|
|
; RUN: llc -mtriple=x86_64-apple-darwin < %s | FileCheck %s
|
|
|
|
|
|
|
|
declare void @lazy() nonlazybind
|
|
|
|
declare void @not()
|
|
|
|
|
2013-07-14 06:24:09 +00:00
|
|
|
; CHECK-LABEL: foo:
|
2011-06-15 20:36:13 +00:00
|
|
|
; CHECK: callq _not
|
|
|
|
; CHECK: callq *_lazy@GOTPCREL(%rip)
|
|
|
|
define void @foo() nounwind {
|
|
|
|
call void @not()
|
|
|
|
call void @lazy()
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2013-07-14 06:24:09 +00:00
|
|
|
; CHECK-LABEL: tail_call_regular:
|
2011-06-15 20:36:13 +00:00
|
|
|
; CHECK: jmp _not
|
|
|
|
define void @tail_call_regular() nounwind {
|
|
|
|
tail call void @not()
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2013-07-14 06:24:09 +00:00
|
|
|
; CHECK-LABEL: tail_call_eager:
|
2011-06-15 20:36:13 +00:00
|
|
|
; CHECK: jmpq *_lazy@GOTPCREL(%rip)
|
|
|
|
define void @tail_call_eager() nounwind {
|
|
|
|
tail call void @lazy()
|
|
|
|
ret void
|
|
|
|
}
|