1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 12:02:58 +02:00
llvm-mirror/test/CodeGen/X86/inline-asm-bad-constraint-n.ll
James Y Knight b1184c5419 Fix handling of the 'n' asm constraint with invalid operands.
It had accidently accepted a symbol+offset value (and emitted
incorrect code for it, keeping only the offset part) instead of
properly reporting the constraint as invalid.

Differential Revision: http://reviews.llvm.org/D11039

llvm-svn: 242040
2015-07-13 16:36:22 +00:00

11 lines
293 B
LLVM

; RUN: not llc -march=x86 -no-integrated-as < %s 2>&1 | FileCheck %s
@x = global i32 0, align 4
;CHECK: error: invalid operand for inline asm constraint 'n'
define void @foo() {
%a = getelementptr i32, i32* @x, i32 1
call void asm sideeffect "foo $0", "n"(i32* %a) nounwind
ret void
}