view test/CodeGen/AArch64/regress-tail-livereg.ll @ 0:95c75e76d11b

LLVM 3.4
author Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
date Thu, 12 Dec 2013 13:56:28 +0900
parents
children 54457678186b
line wrap: on
line source

; RUN: llc -verify-machineinstrs -mtriple=aarch64-none-linux-gnu < %s | FileCheck %s
@var = global void()* zeroinitializer

declare void @bar()

define void @foo() {
; CHECK-LABEL: 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
}