1 ; RUN: llc -o - %s | FileCheck %s
2 target triple="aarch64--"
4 declare void @somefunc()
5 define preserve_mostcc void @test_ccmismatch_notail() {
6 ; Ensure that no tail call is used here, as the called function somefunc does
7 ; not preserve enough registers for preserve_mostcc.
8 ; CHECK-LABEL: test_ccmismatch_notail:
9 ; CHECK-NOT: b somefunc
11 tail call void @somefunc()
15 declare preserve_mostcc void @some_preserve_most_func()
16 define void @test_ccmismatch_tail() {
17 ; We can perform a tail call here, because some_preserve_most_func preserves
18 ; all registers necessary for test_ccmismatch_tail.
19 ; CHECK-LABEL: test_ccmismatch_tail:
20 ; CHECK-NOT: bl some_preserve_most_func
21 ; CHECK: b some_preserve_most_func
22 tail call preserve_mostcc void @some_preserve_most_func()