1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mcpu=pentium2 -mtriple=i686-apple-darwin8.8.0 | FileCheck %s --check-prefix=X86
3 ; RUN: llc < %s -mcpu=pentium3 -mtriple=i686-apple-darwin8.8.0 | FileCheck %s --check-prefix=XMM
4 ; RUN: llc < %s -mcpu=bdver1 -mtriple=i686-apple-darwin8.8.0 | FileCheck %s --check-prefix=YMM
6 %struct.x = type { i16, i16 }
8 define void @t() nounwind {
10 ; X86: ## %bb.0: ## %entry
11 ; X86-NEXT: subl $44, %esp
12 ; X86-NEXT: movl $0, {{[0-9]+}}(%esp)
13 ; X86-NEXT: movl $0, {{[0-9]+}}(%esp)
14 ; X86-NEXT: movl $0, {{[0-9]+}}(%esp)
15 ; X86-NEXT: movl $0, {{[0-9]+}}(%esp)
16 ; X86-NEXT: movl $0, {{[0-9]+}}(%esp)
17 ; X86-NEXT: movl $0, {{[0-9]+}}(%esp)
18 ; X86-NEXT: movl $0, {{[0-9]+}}(%esp)
19 ; X86-NEXT: movl $0, {{[0-9]+}}(%esp)
20 ; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
21 ; X86-NEXT: movl %eax, (%esp)
22 ; X86-NEXT: calll _foo
23 ; X86-NEXT: addl $44, %esp
27 ; XMM: ## %bb.0: ## %entry
28 ; XMM-NEXT: subl $60, %esp
29 ; XMM-NEXT: xorps %xmm0, %xmm0
30 ; XMM-NEXT: movaps %xmm0, {{[0-9]+}}(%esp)
31 ; XMM-NEXT: movaps %xmm0, {{[0-9]+}}(%esp)
32 ; XMM-NEXT: leal {{[0-9]+}}(%esp), %eax
33 ; XMM-NEXT: movl %eax, (%esp)
34 ; XMM-NEXT: calll _foo
35 ; XMM-NEXT: addl $60, %esp
39 ; YMM: ## %bb.0: ## %entry
40 ; YMM-NEXT: subl $60, %esp
41 ; YMM-NEXT: leal {{[0-9]+}}(%esp), %eax
42 ; YMM-NEXT: vxorps %xmm0, %xmm0, %xmm0
43 ; YMM-NEXT: vmovups %ymm0, {{[0-9]+}}(%esp)
44 ; YMM-NEXT: movl %eax, (%esp)
45 ; YMM-NEXT: vzeroupper
46 ; YMM-NEXT: calll _foo
47 ; YMM-NEXT: addl $60, %esp
50 %up_mvd = alloca [8 x %struct.x] ; <ptr> [#uses=2]
51 %up_mvd116 = getelementptr [8 x %struct.x], ptr %up_mvd, i32 0, i32 0 ; <ptr> [#uses=1]
53 call void @llvm.memset.p0.i64(ptr align 8 %up_mvd, i8 0, i64 32, i1 false)
54 call void @foo( ptr %up_mvd116 ) nounwind
58 declare void @foo(ptr)
60 declare void @llvm.memset.p0.i64(ptr nocapture, i8, i64, i1) nounwind
62 ; Ensure that alignment of '0' in an @llvm.memset intrinsic results in
63 ; unaligned loads and stores.
64 define void @PR15348(ptr %a) {
67 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
68 ; X86-NEXT: movb $0, 16(%eax)
69 ; X86-NEXT: movl $0, 12(%eax)
70 ; X86-NEXT: movl $0, 8(%eax)
71 ; X86-NEXT: movl $0, 4(%eax)
72 ; X86-NEXT: movl $0, (%eax)
77 ; XMM-NEXT: movl {{[0-9]+}}(%esp), %eax
78 ; XMM-NEXT: movb $0, 16(%eax)
79 ; XMM-NEXT: movl $0, 12(%eax)
80 ; XMM-NEXT: movl $0, 8(%eax)
81 ; XMM-NEXT: movl $0, 4(%eax)
82 ; XMM-NEXT: movl $0, (%eax)
87 ; YMM-NEXT: movl {{[0-9]+}}(%esp), %eax
88 ; YMM-NEXT: vxorps %xmm0, %xmm0, %xmm0
89 ; YMM-NEXT: vmovups %xmm0, (%eax)
90 ; YMM-NEXT: movb $0, 16(%eax)
92 call void @llvm.memset.p0.i64(ptr %a, i8 0, i64 17, i1 false)