llvm.org GIT mirror llvm / 3ea9755
In 64-bit mode, use i64 to lower memcpy / memset instead of f64. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100137 91177308-0d34-0410-b5e6-96231b3b80d8 Evan Cheng 9 years ago
3 changed file(s) with 26 addition(s) and 9 deletion(s). Raw diff Collapse all Expand all
10961096 return MVT::v4f32;
10971097 } else if (SafeToUseFP &&
10981098 Size >= 8 &&
1099 !Subtarget->is64Bit() &&
10991100 Subtarget->getStackAlignment() >= 8 &&
11001101 Subtarget->hasSSE2())
11011102 return MVT::f64;
0 ; RUN: llc < %s -mattr=+sse2 -mtriple=i686-apple-darwin -mcpu=core2 | FileCheck %s -check-prefix=SSE2
11 ; RUN: llc < %s -mattr=+sse,-sse2 -mtriple=i686-apple-darwin -mcpu=core2 | FileCheck %s -check-prefix=SSE1
22 ; RUN: llc < %s -mattr=-sse -mtriple=i686-apple-darwin -mcpu=core2 | FileCheck %s -check-prefix=NOSSE
3 ; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=core2 | FileCheck %s -check-prefix=X86-64
34
45 %struct.ParmT = type { [25 x i8], i8, i8* }
56 @.str12 = 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" ; <[25 x i8]*> [#uses=1]
2829 ; NOSSE: movl $0
2930 ; NOSSE: movl $101
3031 ; NOSSE: movl $1734438249
32
33 ; X86-64: t1:
34 ; X86-64: movaps _.str12(%rip), %xmm0
35 ; X86-64: movaps %xmm0
36 ; X86-64: movb $0
37 ; X86-64: movq $0
3138 %parms.i = alloca [13 x %struct.ParmT] ; <[13 x %struct.ParmT]*> [#uses=1]
3239 %parms1.i = getelementptr [13 x %struct.ParmT]* %parms.i, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
3340 call void @llvm.memcpy.i32( i8* %parms1.i, i8* getelementptr ([25 x i8]* @.str12, i32 0, i32 0), i32 25, i32 1 ) nounwind
5865 ; NOSSE: movl
5966 ; NOSSE: movl
6067 ; NOSSE: movl
68
69 ; X86-64: t2:
70 ; X86-64: movaps (%rsi), %xmm0
71 ; X86-64: movaps %xmm0, (%rdi)
6172 %tmp2 = bitcast %struct.s0* %a to i8* ; [#uses=1]
6273 %tmp3 = bitcast %struct.s0* %b to i8* ; [#uses=1]
6374 tail call void @llvm.memcpy.i32(i8* %tmp2, i8* %tmp3, i32 16, i32 16)
95106 ; NOSSE: movl
96107 ; NOSSE: movl
97108 ; NOSSE: movl
109
110 ; X86-64: t3:
111 ; X86-64: movq (%rsi), %rax
112 ; X86-64: movq 8(%rsi), %rcx
113 ; X86-64: movq %rcx, 8(%rdi)
114 ; X86-64: movq %rax, (%rdi)
98115 %tmp2 = bitcast %struct.s0* %a to i8* ; [#uses=1]
99116 %tmp3 = bitcast %struct.s0* %b to i8* ; [#uses=1]
100117 tail call void @llvm.memcpy.i32(i8* %tmp2, i8* %tmp3, i32 16, i32 8)
0 ; RUN: llc < %s -mtriple=i386-apple-darwin10.0 -mcpu=core2 -relocation-model=dynamic-no-pic --asm-verbose=0 | FileCheck -check-prefix=I386 %s
1 ; RUN: llc < %s -mtriple=x86_64-apple-darwin10.0 -mcpu=core2 -relocation-model=dynamic-no-pic --asm-verbose=0 | FileCheck -check-prefix=CORE2 %s
12 ; RUN: llc < %s -mtriple=x86_64-apple-darwin10.0 -mcpu=corei7 -relocation-model=dynamic-no-pic --asm-verbose=0 | FileCheck -check-prefix=COREI7 %s
23
1112 bb:
1213 %String2Loc9 = getelementptr inbounds [31 x i8]* %String2Loc, i64 0, i64 0
1314 call void @llvm.memcpy.i64(i8* %String2Loc9, i8* getelementptr inbounds ([31 x i8]* @.str3, i64 0, i64 0), i64 31, i32 1)
14 ; CORE2: movsd _.str3+16
15 ; CORE2: movsd _.str3+8
16 ; CORE2: movsd _.str3
15 ; I386: movsd _.str3+16
16 ; I386: movsd _.str3+8
17 ; I386: movsd _.str3
18
19 ; CORE2: movabsq
20 ; CORE2: movabsq
21 ; CORE2: movabsq
1722
1823 ; COREI7: movups _.str3
1924 br label %bb
2934 ; CORE2-NEXT: .asciz "DHRYSTONE PROGRAM, SOME STRING"
3035 ; CORE2: .align 3
3136 ; CORE2-NEXT: _.str3:
32
33 ; COREI7: .align 3
34 ; COREI7-NEXT: _.str1:
35 ; COREI7-NEXT: .asciz "DHRYSTONE PROGRAM, SOME STRING"
36 ; COREI7: .align 3
37 ; COREI7-NEXT: _.str3: