Fix memcpy and memset bug.
authorYang Rong <rong.r.yang@intel.com>
Tue, 14 Oct 2014 03:48:20 +0000 (11:48 +0800)
committerZhigang Gong <zhigang.gong@intel.com>
Tue, 14 Oct 2014 05:28:05 +0000 (13:28 +0800)
commit73fd076760b67d4d56b7fbcbff34406eef2622a0
treea1e75a3b28880b8aee698a973fe930384cf4378c
parent9e1975569911eefd1f3596683d062c35107ff8ba
Fix memcpy and memset bug.

In ocl_memcpy.ll and ocl_memset.ll, index+4 should be less than size when use int in
memcpy and memset, and need consider alignment.

V3: For performance, provide two versions of memcpy and memset, decide call which one when lowering intrinsic.
V4: add these new functions in the bitcode link filter list.
Signed-off-by: Yang Rong <rong.r.yang@intel.com>
Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>
backend/src/libocl/src/ocl_memcpy.ll
backend/src/libocl/src/ocl_memset.ll
backend/src/llvm/llvm_bitcode_link.cpp
backend/src/llvm/llvm_intrinsic_lowering.cpp