2012-01-01 19:40:22 +00:00
|
|
|
; RUN: llc < %s -mtriple=x86_64-linux -mattr=+sse3 | FileCheck %s
|
|
|
|
; RUN: llc < %s -mtriple=x86_64-win32 -mattr=+sse3 | FileCheck %s -check-prefix=WIN64
|
2010-11-30 07:20:12 +00:00
|
|
|
; PR8573
|
|
|
|
|
2013-07-14 06:24:09 +00:00
|
|
|
; CHECK-LABEL: foo:
|
2012-08-09 22:49:46 +00:00
|
|
|
; CHECK: leaq (%rdi), %rax
|
|
|
|
; CHECK-NEXT: movl %esi, %ecx
|
2010-11-30 07:20:12 +00:00
|
|
|
; CHECK-NEXT: monitor
|
2013-07-14 06:24:09 +00:00
|
|
|
; WIN64-LABEL: foo:
|
2011-03-16 13:52:51 +00:00
|
|
|
; WIN64: leaq (%rcx), %rax
|
|
|
|
; WIN64-NEXT: movl %edx, %ecx
|
|
|
|
; WIN64-NEXT: movl %r8d, %edx
|
|
|
|
; WIN64-NEXT: monitor
|
2010-11-30 07:20:12 +00:00
|
|
|
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
|
|
|
|
|
2013-07-14 06:24:09 +00:00
|
|
|
; CHECK-LABEL: bar:
|
2010-11-30 07:20:12 +00:00
|
|
|
; CHECK: movl %edi, %ecx
|
|
|
|
; CHECK-NEXT: movl %esi, %eax
|
|
|
|
; CHECK-NEXT: mwait
|
2013-07-14 06:24:09 +00:00
|
|
|
; WIN64-LABEL: bar:
|
2011-03-16 13:52:51 +00:00
|
|
|
; WIN64: movl %edx, %eax
|
|
|
|
; WIN64-NEXT: mwait
|
2010-11-30 07:20:12 +00:00
|
|
|
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
|