26 lines · plain
1; RUN: llc -o - %s | FileCheck %s2; RUN: llc -global-isel -verify-machineinstrs -o - %s | FileCheck %s3target triple="aarch64--"4 5declare void @somefunc()6define preserve_allcc void @test_ccmismatch_notail() {7; Ensure that no tail call is used here, as the called function somefunc does8; not preserve enough registers for preserve_allcc.9; CHECK-LABEL: test_ccmismatch_notail:10; CHECK-NOT: b somefunc11; CHECK: bl somefunc12 tail call void @somefunc()13 ret void14}15 16declare preserve_allcc void @some_preserve_all_func()17define void @test_ccmismatch_tail() {18; We can perform a tail call here, because some_preserve_all_func preserves19; all registers necessary for test_ccmismatch_tail.20; CHECK-LABEL: test_ccmismatch_tail:21; CHECK-NOT: bl some_preserve_all_func22; CHECK: b some_preserve_all_func23 tail call preserve_allcc void @some_preserve_all_func()24 ret void25}26