1 ; RUN: llc < %s -mattr=+sse2 -mtriple=i686-apple-darwin -mcpu=core2 | FileCheck %s -check-prefix=SSE2
2 ; RUN: llc < %s -mattr=+sse,-sse2 -mtriple=i686-apple-darwin -mcpu=core2 | FileCheck %s -check-prefix=SSE1
3 ; RUN: llc < %s -mattr=-sse -mtriple=i686-apple-darwin -mcpu=core2 | FileCheck %s -check-prefix=NOSSE
4 ; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=core2 | FileCheck %s -check-prefix=X86-64
6 @.str = internal constant [25 x i8] c"image\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
7 @.str2 = internal constant [30 x i8] c"xxxxxxxxxxxxxxxxxxxxxxxxxxxxx\00", align 4
9 define void @t1(i32 %argc, i8** %argv) nounwind {
12 ; SSE2: movaps _.str, %xmm0
19 ; SSE1: movaps _.str, %xmm0
32 ; NOSSE: movl $1734438249
35 ; X86-64: movaps _.str(%rip), %xmm0
36 ; X86-64: movaps %xmm0
39 %tmp1 = alloca [25 x i8]
40 %tmp2 = bitcast [25 x i8]* %tmp1 to i8*
41 call void @llvm.memcpy.i32( i8* %tmp2, i8* getelementptr ([25 x i8]* @.str, i32 0, i32 0), i32 25, i32 1 ) nounwind
46 %struct.s0 = type { [2 x double] }
48 define void @t2(%struct.s0* nocapture %a, %struct.s0* nocapture %b) nounwind ssp {
51 ; SSE2: movaps (%eax), %xmm0
52 ; SSE2: movaps %xmm0, (%eax)
55 ; SSE1: movaps (%eax), %xmm0
56 ; SSE1: movaps %xmm0, (%eax)
71 ; X86-64: movaps (%rsi), %xmm0
72 ; X86-64: movaps %xmm0, (%rdi)
73 %tmp2 = bitcast %struct.s0* %a to i8* ; <i8*> [#uses=1]
74 %tmp3 = bitcast %struct.s0* %b to i8* ; <i8*> [#uses=1]
75 tail call void @llvm.memcpy.i32(i8* %tmp2, i8* %tmp3, i32 16, i32 16)
79 define void @t3(%struct.s0* nocapture %a, %struct.s0* nocapture %b) nounwind ssp {
82 ; SSE2: movsd (%eax), %xmm0
83 ; SSE2: movsd 8(%eax), %xmm1
84 ; SSE2: movsd %xmm1, 8(%eax)
85 ; SSE2: movsd %xmm0, (%eax)
112 ; X86-64: movq (%rsi), %rax
113 ; X86-64: movq 8(%rsi), %rcx
114 ; X86-64: movq %rcx, 8(%rdi)
115 ; X86-64: movq %rax, (%rdi)
116 %tmp2 = bitcast %struct.s0* %a to i8* ; <i8*> [#uses=1]
117 %tmp3 = bitcast %struct.s0* %b to i8* ; <i8*> [#uses=1]
118 tail call void @llvm.memcpy.i32(i8* %tmp2, i8* %tmp3, i32 16, i32 8)
122 define void @t4() nounwind {
126 ; SSE2: movl $2021161080
127 ; SSE2: movl $2021161080
128 ; SSE2: movl $2021161080
129 ; SSE2: movl $2021161080
130 ; SSE2: movl $2021161080
131 ; SSE2: movl $2021161080
132 ; SSE2: movl $2021161080
136 ; SSE1: movl $2021161080
137 ; SSE1: movl $2021161080
138 ; SSE1: movl $2021161080
139 ; SSE1: movl $2021161080
140 ; SSE1: movl $2021161080
141 ; SSE1: movl $2021161080
142 ; SSE1: movl $2021161080
146 ; NOSSE: movl $2021161080
147 ; NOSSE: movl $2021161080
148 ; NOSSE: movl $2021161080
149 ; NOSSE: movl $2021161080
150 ; NOSSE: movl $2021161080
151 ; NOSSE: movl $2021161080
152 ; NOSSE: movl $2021161080
155 ; X86-64: movabsq $8680820740569200760, %rax
160 ; X86-64: movl $2021161080
161 %tmp1 = alloca [30 x i8]
162 %tmp2 = bitcast [30 x i8]* %tmp1 to i8*
163 call void @llvm.memcpy.i32(i8* %tmp2, i8* getelementptr inbounds ([30 x i8]* @.str2, i32 0, i32 0), i32 30, i32 1)
167 declare void @llvm.memcpy.i32(i8* nocapture, i8* nocapture, i32, i32) nounwind