2013-02-01 11:40:47 +00:00
|
|
|
; RUN: llc -verify-machineinstrs -mtriple=aarch64-none-linux-gnu < %s | FileCheck %s
|
2014-04-16 11:53:07 +00:00
|
|
|
; RUN: llc -verify-machineinstrs -mtriple=arm64-apple-ios7.0 -o - %s | FileCheck %s
|
2013-01-31 12:12:40 +00:00
|
|
|
@var = global void()* zeroinitializer
|
|
|
|
|
|
|
|
declare void @bar()
|
|
|
|
|
|
|
|
define void @foo() {
|
2013-07-14 06:24:09 +00:00
|
|
|
; CHECK-LABEL: foo:
|
2013-01-31 12:12:40 +00:00
|
|
|
%func = load void()** @var
|
|
|
|
|
|
|
|
; Calling a function encourages @foo to use a callee-saved register,
|
|
|
|
; which makes it a natural choice for the tail call itself. But we don't
|
|
|
|
; want that: the final "br xN" has to use a temporary or argument
|
|
|
|
; register.
|
|
|
|
call void @bar()
|
|
|
|
|
|
|
|
tail call void %func()
|
|
|
|
; CHECK: br {{x([0-79]|1[0-8])}}
|
|
|
|
ret void
|
2013-07-13 20:38:47 +00:00
|
|
|
}
|