[fast-isel] Remove an invalid assert.

If the memcpy has an odd length with an alignment of 2, this would incorrectly
assert on the last 1 byte copy.
rdar://13202135

llvm-svn: 175459
This commit is contained in:
Chad Rosier 2013-02-18 21:46:28 +00:00
parent 5c6e653b72
commit f3f8f443e1
2 changed files with 7 additions and 1 deletions

View File

@ -2458,7 +2458,6 @@ bool ARMFastISel::ARMTryEmitSmallMemCpy(Address Dest, Address Src,
if (Len >= 2 && Alignment == 2)
VT = MVT::i16;
else {
assert (Alignment == 1 && "Expected an alignment of 1!");
VT = MVT::i8;
}
}

View File

@ -231,3 +231,10 @@ define void @t6() nounwind ssp {
call void @llvm.memcpy.p0i8.p0i8.i32(i8* getelementptr inbounds ([60 x i8]* @temp, i32 0, i32 4), i8* getelementptr inbounds ([60 x i8]* @temp, i32 0, i32 16), i32 10, i32 1, i1 false)
ret void
}
rdar://13202135
define void @t7() nounwind ssp {
; Just make sure this doesn't assert when we have an odd length and an alignment of 2.
call void @llvm.memcpy.p0i8.p0i8.i32(i8* getelementptr inbounds ([60 x i8]* @temp, i32 0, i32 4), i8* getelementptr inbounds ([60 x i8]* @temp, i32 0, i32 16), i32 3, i32 2, i1 false)
ret void
}