[PATCH] D20262: [DSE]Split memset when the memset is small enough to be lowered to stores

Daniel Berlin via llvm-commits llvm-commits at lists.llvm.org
Tue May 24 08:47:17 PDT 2016


dberlin added a comment.

These tests don't seem to give me a lot of information about what you expect to happen and when.
Can you modify them to actually test that stores get eliminated (because if they are not, this whole thing seems speculative enough that it probably should be value profile guided in some fashion)


================
Comment at: test/Transforms/DeadStoreElimination/SplitMemintrinsic.ll:10
@@ +9,3 @@
+; CHECK: call void @llvm.memset.p0i8.i64(i8* %1, i8 0, i64 16, i32 8, i1 false)
+entry:
+  %0 = bitcast i64* %P to i8*
----------------
Errr, so what gets eliminated here?

================
Comment at: test/Transforms/DeadStoreElimination/SplitMemintrinsic.ll:34
@@ +33,3 @@
+; CHECK-NOT: call void @llvm.memset.p0i8.i64
+entry:
+  %0 = bitcast i64* %P to i8*
----------------
Again, if your goal is to test that perform dead store elimination, you should test that, not just test that we turn the memset into stores.


http://reviews.llvm.org/D20262





More information about the llvm-commits mailing list