From 5df2e16ba1c1744a120352c2551211e8eff1f38c Mon Sep 17 00:00:00 2001 From: Chad Rosier Date: Thu, 25 Apr 2013 17:10:21 +0000 Subject: [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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180445 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/X86/asm-invalid-register-class-crasher.ll | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 test/CodeGen/X86/asm-invalid-register-class-crasher.ll (limited to 'test') diff --git a/test/CodeGen/X86/asm-invalid-register-class-crasher.ll b/test/CodeGen/X86/asm-invalid-register-class-crasher.ll new file mode 100644 index 0000000..24e2284 --- /dev/null +++ b/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 +} -- cgit v1.1