blob: d0c64f2433865dbadf58f7dd35dc498dfb9ac38b [file] [log] [blame]
Eric Christopher228232b2010-11-30 07:20:12 +00001; RUN: llc < %s -o - -march=x86-64 | FileCheck %s
2; PR8573
3
Eric Christopherc459d062010-11-30 09:23:54 +00004; CHECK: foo:
Eric Christopher228232b2010-11-30 07:20:12 +00005; CHECK: leaq (%rdi), %rax
6; CHECK-NEXT: movl %esi, %ecx
7; CHECK-NEXT: monitor
8define void @foo(i8* %P, i32 %E, i32 %H) nounwind {
9entry:
10 tail call void @llvm.x86.sse3.monitor(i8* %P, i32 %E, i32 %H)
11 ret void
12}
13
14declare void @llvm.x86.sse3.monitor(i8*, i32, i32) nounwind
15
Eric Christopherc459d062010-11-30 09:23:54 +000016; CHECK: bar:
Eric Christopher228232b2010-11-30 07:20:12 +000017; CHECK: movl %edi, %ecx
18; CHECK-NEXT: movl %esi, %eax
19; CHECK-NEXT: mwait
20define void @bar(i32 %E, i32 %H) nounwind {
21entry:
22 tail call void @llvm.x86.sse3.mwait(i32 %E, i32 %H)
23 ret void
24}
25
26declare void @llvm.x86.sse3.mwait(i32, i32) nounwind