2016-07-19 21:35:11 +08:00
|
|
|
; RUN: not llc -mtriple=arm64-eabi < %s 2> %t
|
2014-03-29 18:18:08 +08:00
|
|
|
; RUN: FileCheck --check-prefix=CHECK-ERRORS < %t %s
|
|
|
|
|
|
|
|
; Check for at least one invalid constant.
|
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 13:52:47 +08:00
|
|
|
; CHECK-ERRORS: error: value out of range for constraint 'M'
|
2014-03-29 18:18:08 +08:00
|
|
|
|
|
|
|
define i32 @constraint_M(i32 %i, i32 %j) nounwind {
|
|
|
|
entry:
|
|
|
|
%0 = tail call i32 asm sideeffect "movk $0, $1", "=r,M"(i32 305418240) nounwind
|
|
|
|
ret i32 %0
|
|
|
|
}
|