[PATCH] D27034: [AliasAnalysis] Teach BasicAA about memcpy.

bryant via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 22 21:03:23 PST 2016


bryant added inline comments.


================
Comment at: test/Analysis/BasicAA/cs-cs.ll:53
+; CHECK:   Just Mod:   tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i32 1, i1 false) <->   tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i32 1, i1 false)
+; CHECK:   Just Mod:   tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i32 1, i1 false) <->   tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i32 1, i1 false)
 }
----------------
I'm uncertain about the correctness of this result. Since both operands are must-alias, shouldn't this remain "Both ModRef"?


================
Comment at: test/Analysis/BasicAA/cs-cs.ll:221
+; CHECK: Just Mod:   tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i32 1, i1 false) <->   tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %R, i64 12, i32 1, i1 false)
+; CHECK: Just Mod:   tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %R, i64 12, i32 1, i1 false) <->   tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i32 1, i1 false)
 }
----------------
Since %R and %Q may alias, should this remain "Both ModRef"?


Repository:
  rL LLVM

https://reviews.llvm.org/D27034





More information about the llvm-commits mailing list