; Because some arguments are passed by reference (through stack), ; the compiler should not do tail-call optimization. ; RUN: llc -mtriple=aarch64 -mattr=+sve < %s | FileCheck %s ; 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(, , , , )