llvm-project/llvm/test/CodeGen/X86/inline-asm-bad-constraint-n.ll
Nick Desaulniers 35a364fa5c
[TargetLowering] fix index OOB (#67494)
I accidentally introduced this in

commit 330fa7d2a4e0 ("[TargetLowering] Deduplicate choosing InlineAsm
constraint between ISels (#67057)")

Fix forward.
2023-09-26 15:50:26 -07:00

17 lines
441 B
LLVM

; RUN: not llc -mtriple=i686-- -no-integrated-as < %s 2>&1 | FileCheck %s
@x = global i32 0, align 4
; CHECK: error: constraint 'n' expects an integer constant expression
define void @foo() {
%a = getelementptr i32, ptr @x, i32 1
call void asm sideeffect "foo $0", "n"(ptr %a) nounwind
ret void
}
; CHECK: error: invalid operand for inline asm constraint 'i'
define void @bar(i32 %v) {
call void asm "", "in"(i32 %v)
ret void
}