[PATCH] D22001: [DSE] Remove dead stores in end blocks containing fence

JF Bastien via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 7 10:23:55 PDT 2016

jfb added a comment.

I'm not sure I understand the mentions of end block. Why is this relevant? A dead store is dead, regardless of successors. Could you explain?

If it is relevant, I'd like to see a test that explains the relevance, and makes sure correctness is retained if there is a successor.

Comment at: test/Transforms/DeadStoreElimination/fence.ll:80
@@ +79,3 @@
+; This is a full fence, but since the stores is to stack allocated location, we can remove the stores (and leave the fence as-is).
+define void @fence_seq_cst(i32* %P2) {
+; CHECK-LABEL: @fence_seq_cst
`%P2` is useless here.


More information about the llvm-commits mailing list