Stackmap shadows should consider call returns a branch target.
[oota-llvm.git] / test / CodeGen / X86 / apm.ll
1 ; RUN: llc < %s -mtriple=x86_64-linux -mattr=+sse3 | FileCheck %s
2 ; RUN: llc < %s -mtriple=x86_64-win32 -mattr=+sse3 | FileCheck %s -check-prefix=WIN64
3 ; PR8573
4
5 ; CHECK-LABEL: foo:
6 ; CHECK: leaq    (%rdi), %rax
7 ; CHECK-NEXT: movl    %esi, %ecx
8 ; CHECK-NEXT: monitor
9 ; WIN64-LABEL: foo:
10 ; WIN64:      leaq    (%rcx), %rax
11 ; WIN64-NEXT: movl    %edx, %ecx
12 ; WIN64-NEXT: movl    %r8d, %edx
13 ; WIN64-NEXT: monitor
14 define void @foo(i8* %P, i32 %E, i32 %H) nounwind {
15 entry:
16   tail call void @llvm.x86.sse3.monitor(i8* %P, i32 %E, i32 %H)
17   ret void
18 }
19
20 declare void @llvm.x86.sse3.monitor(i8*, i32, i32) nounwind
21
22 ; CHECK-LABEL: bar:
23 ; CHECK: movl    %edi, %ecx
24 ; CHECK-NEXT: movl    %esi, %eax
25 ; CHECK-NEXT: mwait
26 ; WIN64-LABEL: bar:
27 ; WIN64:      movl    %edx, %eax
28 ; WIN64-NEXT: mwait
29 define void @bar(i32 %E, i32 %H) nounwind {
30 entry:
31   tail call void @llvm.x86.sse3.mwait(i32 %E, i32 %H)
32   ret void
33 }
34
35 declare void @llvm.x86.sse3.mwait(i32, i32) nounwind