From 0cc000ef29d00d110a9b1d04422e4ef75644d019 Mon Sep 17 00:00:00 2001 From: Richard Osborne Date: Mon, 1 Aug 2011 16:45:59 +0000 Subject: Fix crash with varargs function with no named parameters. llvm-svn: 136623 --- llvm/test/CodeGen/XCore/2011-08-01-VarargsBug.ll | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 llvm/test/CodeGen/XCore/2011-08-01-VarargsBug.ll (limited to 'llvm/test/CodeGen/XCore') diff --git a/llvm/test/CodeGen/XCore/2011-08-01-VarargsBug.ll b/llvm/test/CodeGen/XCore/2011-08-01-VarargsBug.ll new file mode 100644 index 00000000000..2076057441e --- /dev/null +++ b/llvm/test/CodeGen/XCore/2011-08-01-VarargsBug.ll @@ -0,0 +1,17 @@ +; RUN: llc < %s -march=xcore | FileCheck %s +define void @_Z1fz(...) { +entry: +; CHECK: _Z1fz: +; CHECK: extsp 3 +; CHECK: stw r[[REG:[0-3]{1,1}]] +; CHECK: , sp{{\[}}[[REG]]{{\]}} +; CHECK: stw r[[REG:[0-3]{1,1}]] +; CHECK: , sp{{\[}}[[REG]]{{\]}} +; CHECK: stw r[[REG:[0-3]{1,1}]] +; CHECK: , sp{{\[}}[[REG]]{{\]}} +; CHECK: stw r[[REG:[0-3]{1,1}]] +; CHECK: , sp{{\[}}[[REG]]{{\]}} +; CHECK: ldaw sp, sp[3] +; CHECK: retsp 0 + ret void +} -- cgit v1.2.3