mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-30 23:42:52 +01:00
19 lines
551 B
LLVM
19 lines
551 B
LLVM
|
; RUN: llc -verify-machineinstrs -march=aarch64 < %s | FileCheck %s
|
||
|
@var = global void()* zeroinitializer
|
||
|
|
||
|
declare void @bar()
|
||
|
|
||
|
define void @foo() {
|
||
|
; CHECK: foo:
|
||
|
%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
|
||
|
}
|