Convert CodeGen/*/*.ll tests to use the new CHECK-LABEL for easier debugging. No...
[oota-llvm.git] / test / CodeGen / AArch64 / regress-tail-livereg.ll
1 ; RUN: llc -verify-machineinstrs -mtriple=aarch64-none-linux-gnu < %s | FileCheck %s
2 @var = global void()* zeroinitializer
3
4 declare void @bar()
5
6 define void @foo() {
7 ; CHECK: foo:
8        %func = load void()** @var
9
10        ; Calling a function encourages @foo to use a callee-saved register,
11        ; which makes it a natural choice for the tail call itself. But we don't
12        ; want that: the final "br xN" has to use a temporary or argument
13        ; register.
14        call void @bar()
15
16        tail call void %func()
17 ; CHECK: br {{x([0-79]|1[0-8])}}
18        ret void
19 }