llvm-project/llvm/test/CodeGen/X86/inline-asm-imm-out-of-range.ll
Bill Wendling 41a2847a9a Emit diagnostic if an inline asm constraint requires an immediate
Summary:
An inline asm call can result in an immediate after inlining. Therefore emit a
diagnostic here if constraint requires an immediate but one isn't supplied.

Reviewers: joerg, mgorny, efriedma, rsmith

Reviewed By: joerg

Subscribers: asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, s.egerton, MaskRay, jyknight, dylanmckay, javed.absar, fedor.sergeev, jrtc27, Jim, krytarowski, eraman, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D60942

llvm-svn: 367750
2019-08-03 05:52:47 +00:00

8 lines
212 B
LLVM

; RUN: not llc -mtriple=i686-- -no-integrated-as < %s 2>&1 | FileCheck %s
; CHECK: error: value out of range for constraint 'I'
define void @foo() {
call void asm sideeffect "foo $0", "I"(i32 42)
ret void
}