llvm.org GIT mirror llvm / b4ac285
Do not throw away alignment when generating the DAG for memset; we may need it to decide between MOVAPS and MOVUPS later. Adjust a test that was looking for wrong code. PR 3866 / 8675131. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119605 91177308-0d34-0410-b5e6-96231b3b80d8 Dale Johannesen 9 years ago
3 changed file(s) with 17 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
34863486 SDValue Store = DAG.getStore(Chain, dl, Value,
34873487 getMemBasePlusOffset(Dst, DstOff, DAG),
34883488 DstPtrInfo.getWithOffset(DstOff),
3489 isVol, false, 0);
3489 isVol, false, Align);
34903490 OutChains.push_back(Store);
34913491 DstOff += VTSize;
34923492 }
None ; RUN: llc < %s -mtriple=i386-apple-darwin -mcpu=nehalem | grep movaps | count 5
0 ; RUN: llc < %s -mtriple=i386-apple-darwin -mcpu=nehalem | grep movups | count 5
11 ; RUN: llc < %s -mtriple=i386-apple-darwin -mcpu=core2 | grep movl | count 20
22 ; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=core2 | grep movq | count 10
33
0 ; RUN: llc -mtriple=x86_64-apple-darwin -mcpu=nehalem < %s | FileCheck %s
1
2 @a = common global [3 x i64] zeroinitializer, align 16
3
4 define i32 @main() nounwind ssp {
5 ; CHECK: movups
6 entry:
7 %retval = alloca i32, align 4
8 store i32 0, i32* %retval
9 call void @llvm.memset.p0i8.i64(i8* bitcast (i64* getelementptr inbounds ([3 x i64]* @a, i32 0, i64 1) to i8*), i8 0, i64 16, i32 1, i1 false)
10 %0 = load i32* %retval
11 ret i32 %0
12 }
13
14 declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i32, i1) nounwind