[PATCH] [PR18800] Fix incorrect test case resulting in crash when running vector_memcpy.ll with -sroa
Karthik Bhat
kv.bhat at samsung.com
Tue Mar 11 21:23:30 PDT 2014
Hi chandlerc, rafael,
Hi Chandler, Rafael,
llvm intrinsic memcpy takes 5 arguments
void @llvm.memcpy.p0i8.p0i8.i32(i8* <dest>, i8* <src>, i32 <len>, i32 <align>, i1 <isvolatile>)
The test case incorrectly uses the old format resulting in isVolatile function in MemIntrinsic to crash during SROA transformation.
Modified the test case to use correct signature of memcpy and memset.
Could someone please review it for me?
Thanks
Karthik Bhat
http://llvm-reviews.chandlerc.com/D3050
Files:
test/Transforms/ScalarRepl/vector_memcpy.ll
Index: test/Transforms/ScalarRepl/vector_memcpy.ll
===================================================================
--- test/Transforms/ScalarRepl/vector_memcpy.ll
+++ test/Transforms/ScalarRepl/vector_memcpy.ll
@@ -9,7 +9,7 @@
store <16 x float> %A, <16 x float>* %tmp
%s = bitcast <16 x float>* %tmp to i8*
%s2 = bitcast <16 x float>* %tmp2 to i8*
- call void @llvm.memcpy.i64(i8* %s2, i8* %s, i64 64, i32 16)
+ call void @llvm.memcpy.i64(i8* %s2, i8* %s, i64 64, i32 16, i1 false)
%R = load <16 x float>* %tmp2
ret <16 x float> %R
@@ -19,12 +19,12 @@
%tmp2 = alloca <16 x float>, align 16
%s2 = bitcast <16 x float>* %tmp2 to i8*
- call void @llvm.memset.i64(i8* %s2, i8 0, i64 64, i32 16)
+ call void @llvm.memset.i64(i8* %s2, i8 0, i64 64, i32 16, i1 false)
%R = load <16 x float>* %tmp2
ret <16 x float> %R
}
-declare void @llvm.memcpy.i64(i8* nocapture, i8* nocapture, i64, i32) nounwind
-declare void @llvm.memset.i64(i8* nocapture, i8, i64, i32) nounwind
+declare void @llvm.memcpy.i64(i8* nocapture, i8* nocapture, i64, i32, i1) nounwind
+declare void @llvm.memset.i64(i8* nocapture, i8, i64, i32, i1) nounwind
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D3050.1.patch
Type: text/x-patch
Size: 1155 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140311/1579a6f9/attachment.bin>
More information about the llvm-commits
mailing list