1; RUN: llc -o - %s | FileCheck %s 2target triple="aarch64--" 3 4declare void @somefunc() 5define 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 10; CHECK: bl somefunc 11 tail call void @somefunc() 12 ret void 13} 14 15declare preserve_mostcc void @some_preserve_most_func() 16define 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() 23 ret void 24} 25