diff options
author | Dale Johannesen <dalej@apple.com> | 2010-07-06 23:27:00 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2010-07-06 23:27:00 +0000 |
commit | ce656633304f88fb7e0fa3cb0c6660a4b6cc0bd5 (patch) | |
tree | 14ae114b9f79c232654795fe7d324b379f3e0ea4 /llvm/test/CodeGen/X86/2010-07-06-asm-RIP.ll | |
parent | 70ee3ecd33f5f28a15388d640b0d158cd522b860 (diff) | |
download | bcm5719-llvm-ce656633304f88fb7e0fa3cb0c6660a4b6cc0bd5.tar.gz bcm5719-llvm-ce656633304f88fb7e0fa3cb0c6660a4b6cc0bd5.zip |
Accept RIP-relative symbols with 'i' constraint, and
print the (%rip) only if the 'a' modifier is present.
PR 7528.
llvm-svn: 107727
Diffstat (limited to 'llvm/test/CodeGen/X86/2010-07-06-asm-RIP.ll')
-rw-r--r-- | llvm/test/CodeGen/X86/2010-07-06-asm-RIP.ll | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/2010-07-06-asm-RIP.ll b/llvm/test/CodeGen/X86/2010-07-06-asm-RIP.ll new file mode 100644 index 00000000000..f646afaa266 --- /dev/null +++ b/llvm/test/CodeGen/X86/2010-07-06-asm-RIP.ll @@ -0,0 +1,21 @@ +; RUN: llc < %s -mtriple=x86_64-apple-darwin | FileCheck %s +; PR 7528 + +@n = global i32 0 ; <i32*> [#uses=2] + +define void @f(i32*) nounwind ssp { + ret void +} + +define void @g() nounwind ssp { +entry: +; CHECK: _g: +; CHECK: push $_f$_f +; CHECK: call _f(%rip) + call void asm sideeffect "push\09$1$1\0A\09call\09${1:a}\0A\09pop\09%edx", "imr,i,~{dirflag},~{fpsr},~{flags},~{memory},~{cc},~{edi},~{esi},~{edx},~{ecx},~{ebx},~{eax}"(i32* @n, void (i32*)* @f) nounwind + br label %return + +return: ; preds = %entry + ret void +} + |