summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/XCore
diff options
context:
space:
mode:
authorRichard Osborne <richard@xmos.com>2011-08-01 16:45:59 +0000
committerRichard Osborne <richard@xmos.com>2011-08-01 16:45:59 +0000
commit0cc000ef29d00d110a9b1d04422e4ef75644d019 (patch)
treeaf1cf7d3185e26670ba50d933e801888e66dcc8e /llvm/test/CodeGen/XCore
parent789ee677d9f040af9fcdd9c0d9c9c71a0911acab (diff)
downloadbcm5719-llvm-0cc000ef29d00d110a9b1d04422e4ef75644d019.tar.gz
bcm5719-llvm-0cc000ef29d00d110a9b1d04422e4ef75644d019.zip
Fix crash with varargs function with no named parameters.
llvm-svn: 136623
Diffstat (limited to 'llvm/test/CodeGen/XCore')
-rw-r--r--llvm/test/CodeGen/XCore/2011-08-01-VarargsBug.ll17
1 files changed, 17 insertions, 0 deletions
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
+}
OpenPOWER on IntegriCloud