Let memcpy -> load/store i8 raise memory mismatch
ADD
tests/alive-tv/memory/memcpy-3-loadstore.srctgt.ll
+; ERROR: Mismatch in memory
+
+define void @src(i8* %p, i8* %q) {
+ tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %q, i8* %p, i64 1, i1 false)
+ ret void
+}
+
+define void @tgt(i8* %p, i8* %q) {
+ %v = load i8, i8* %p
+ store i8 %v, i8* %q
+ ret void
+}
+
+declare void @llvm.memcpy.p0i8.p0i8.i64(i8*, i8*, i64, i1)

MODIFY
tools/transform.cpp
tools/transform.cpp
@@ -612,6 +612,7 @@ static uint64_t get_access_size(const Instr &inst) {
#endif
// FIXME: memcpy doesn't have multi-byte support
(void)i;
+ does_ptr_mem_access = true;
return 1;
}

Let memcpy -> load/store i8 raise memory mismatch (#341)