diff options
author | Eric Christopher <echristo@apple.com> | 2010-11-30 07:20:12 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2010-11-30 07:20:12 +0000 |
commit | 228232b2821f8e7f9c0b874ad733414bda183db6 (patch) | |
tree | 5119d6d74ed6e1ff5cce3a2130cc4381251cfbff /test/CodeGen | |
parent | 303023d9ffba419ffdd68862ea790e00c4f30cbf (diff) | |
download | external_llvm-228232b2821f8e7f9c0b874ad733414bda183db6.zip external_llvm-228232b2821f8e7f9c0b874ad733414bda183db6.tar.gz external_llvm-228232b2821f8e7f9c0b874ad733414bda183db6.tar.bz2 |
Rewrite mwait and monitor support and custom lower arguments.
Fixes PR8573.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120404 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen')
-rw-r--r-- | test/CodeGen/X86/apm.ll | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/CodeGen/X86/apm.ll b/test/CodeGen/X86/apm.ll new file mode 100644 index 0000000..b112185 --- /dev/null +++ b/test/CodeGen/X86/apm.ll @@ -0,0 +1,26 @@ +; RUN: llc < %s -o - -march=x86-64 | FileCheck %s +; PR8573 + +; CHECK: _foo: +; CHECK: leaq (%rdi), %rax +; CHECK-NEXT: movl %esi, %ecx +; CHECK-NEXT: monitor +define void @foo(i8* %P, i32 %E, i32 %H) nounwind { +entry: + tail call void @llvm.x86.sse3.monitor(i8* %P, i32 %E, i32 %H) + ret void +} + +declare void @llvm.x86.sse3.monitor(i8*, i32, i32) nounwind + +; CHECK: _bar: +; CHECK: movl %edi, %ecx +; CHECK-NEXT: movl %esi, %eax +; CHECK-NEXT: mwait +define void @bar(i32 %E, i32 %H) nounwind { +entry: + tail call void @llvm.x86.sse3.mwait(i32 %E, i32 %H) + ret void +} + +declare void @llvm.x86.sse3.mwait(i32, i32) nounwind |