diff options
author | Bill Wendling <isanbard@gmail.com> | 2019-08-03 05:52:47 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2019-08-03 05:52:47 +0000 |
commit | 41a2847a9ae50a9cc52f754d52692357d0e28bbf (patch) | |
tree | e4e1ac32196becabe24a43689823b64c70c21ac7 /llvm/test/CodeGen/X86/inline-asm-n-constraint.ll | |
parent | 10bf563171c5daf8e9bf8cf52f57f0790e1ff853 (diff) | |
download | bcm5719-llvm-41a2847a9ae50a9cc52f754d52692357d0e28bbf.tar.gz bcm5719-llvm-41a2847a9ae50a9cc52f754d52692357d0e28bbf.zip |
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
Diffstat (limited to 'llvm/test/CodeGen/X86/inline-asm-n-constraint.ll')
-rw-r--r-- | llvm/test/CodeGen/X86/inline-asm-n-constraint.ll | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/inline-asm-n-constraint.ll b/llvm/test/CodeGen/X86/inline-asm-n-constraint.ll new file mode 100644 index 00000000000..669e464f1f6 --- /dev/null +++ b/llvm/test/CodeGen/X86/inline-asm-n-constraint.ll @@ -0,0 +1,13 @@ +; RUN: llc -mtriple=x86_64-unknown-unknown -no-integrated-as < %s 2>&1 | FileCheck %s + +@x = global i32 0, align 4 + +define void @foo() { +; CHECK-LABEL: foo: + call void asm sideeffect "foo $0", "n"(i32 42) nounwind +; CHECK: #APP +; CHECK-NEXT: foo $42 +; CHECK-NEXT: #NO_APP + ret void +; CHECK-NEXT: retq +} |