summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2013-04-25 17:10:21 +0000
committerChad Rosier <mcrosier@apple.com>2013-04-25 17:10:21 +0000
commit8180db1f035efa35d5da2a17e9125ded34d5d8e4 (patch)
tree9d9ab7413dbdb2f1502b0423afd9f818afcc785b /llvm/test
parentdfa25a07d4ff78a8a4f16379b0a5b3b976c49361 (diff)
downloadbcm5719-llvm-8180db1f035efa35d5da2a17e9125ded34d5d8e4.tar.gz
bcm5719-llvm-8180db1f035efa35d5da2a17e9125ded34d5d8e4.zip
[inline asm] Add a test case for r180226. The specific issue is that the inline
assembly is requesting a 64-bit register, which is invalid for i386. rdar://13731657 llvm-svn: 180445
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/CodeGen/X86/asm-invalid-register-class-crasher.ll9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/asm-invalid-register-class-crasher.ll b/llvm/test/CodeGen/X86/asm-invalid-register-class-crasher.ll
new file mode 100644
index 00000000000..24e2284c8c8
--- /dev/null
+++ b/llvm/test/CodeGen/X86/asm-invalid-register-class-crasher.ll
@@ -0,0 +1,9 @@
+; RUN: not llc < %s -mtriple=i386-apple-darwin 2>&1 %t
+
+; Previously, this would assert in an assert build, but crash in a release build.
+; No FileCheck, just make sure we handle this gracefully.
+define i64 @t1(i64* %p, i64 %val) #0 {
+entry:
+ %0 = tail call i64 asm sideeffect "xaddq $0, $1", "=q,*m,0,~{memory},~{cc},~{dirflag},~{fpsr},~{flags}"(i64* %p, i64 %val)
+ ret i64 %0
+}
OpenPOWER on IntegriCloud