summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/anyregcc-crash.ll
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2013-11-13 03:46:19 +0000
committerAndrew Trick <atrick@apple.com>2013-11-13 03:46:19 +0000
commitbf8b04919adfafba0ac1a361120b29b38608132f (patch)
tree8f0504838dc472bc0063d4a9d95714f0b605f152 /test/CodeGen/X86/anyregcc-crash.ll
parent429af0e0a790f915595726cec47154f670cf7f87 (diff)
downloadllvm-bf8b04919adfafba0ac1a361120b29b38608132f.tar.gz
llvm-bf8b04919adfafba0ac1a361120b29b38608132f.tar.bz2
llvm-bf8b04919adfafba0ac1a361120b29b38608132f.tar.xz
Add a test case to verify that misusing anyregcc crashes as expected.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194553 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/anyregcc-crash.ll')
-rw-r--r--test/CodeGen/X86/anyregcc-crash.ll17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/CodeGen/X86/anyregcc-crash.ll b/test/CodeGen/X86/anyregcc-crash.ll
new file mode 100644
index 0000000000..cf6f6edb31
--- /dev/null
+++ b/test/CodeGen/X86/anyregcc-crash.ll
@@ -0,0 +1,17 @@
+; RUN: not llc < %s -mtriple=x86_64-apple-darwin 2>&1 | FileCheck %s
+;
+; Check that misuse of anyregcc results in a compile time error.
+
+; CHECK: LLVM ERROR: ran out of registers during register allocation
+define i64 @anyreglimit(i64 %v1, i64 %v2, i64 %v3, i64 %v4, i64 %v5, i64 %v6,
+ i64 %v7, i64 %v8, i64 %v9, i64 %v10, i64 %v11, i64 %v12,
+ i64 %v13, i64 %v14, i64 %v15, i64 %v16) {
+entry:
+ %result = tail call anyregcc i64 (i32, i32, i8*, i32, ...)* @llvm.experimental.patchpoint.i64(i32 12, i32 15, i8* inttoptr (i64 0 to i8*), i32 16,
+ i64 %v1, i64 %v2, i64 %v3, i64 %v4, i64 %v5, i64 %v6,
+ i64 %v7, i64 %v8, i64 %v9, i64 %v10, i64 %v11, i64 %v12,
+ i64 %v13, i64 %v14, i64 %v15, i64 %v16)
+ ret i64 %result
+}
+
+declare i64 @llvm.experimental.patchpoint.i64(i32, i32, i8*, i32, ...)