; Because some arguments are passed by reference (through stack), ; the compiler should not do tail-call optimization. ; RUN: llc -mtriple=aarch64 -mattr=+sve < %s 2>%t | FileCheck %s ; RUN: FileCheck --check-prefix=WARN --allow-empty %s <%t ; If this check fails please read test/CodeGen/AArch64/README for instructions on how to resolve it. ; WARN-NOT: warning ; CHECK-LABEL: caller: ; CHECK: addvl sp, sp, #-[[STACKSIZE:[0-9]+]] ; CHECK-NOT: addvl sp ; CHECK: bl callee ; CHECK: addvl sp, sp, #[[STACKSIZE]] ; CHECK: ret define @caller( %v) { %1 = tail call @callee( %v, %v, %v, %v, %v, %v, %v, %v, %v) ret %1 } declare @callee(, , , , , , , , ) ; CHECK-LABEL: caller_pred: ; CHECK: addvl sp, sp, #-[[STACKSIZE:[0-9]+]] ; CHECK-NOT: addvl sp ; CHECK: bl callee_pred ; CHECK: addvl sp, sp, #[[STACKSIZE]] ; CHECK: ret define @caller_pred( %v) { %1 = tail call @callee_pred( %v, %v, %v, %v, %v) ret %1 } declare @callee_pred(, , , , )