[PATCH] D15397: [EarlyCSE] DSE of stores which write back loaded values

hfinkel@anl.gov via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 10 01:43:56 PST 2015


hfinkel accepted this revision.
hfinkel added a comment.
This revision is now accepted and ready to land.

LGTM.


================
Comment at: lib/Transforms/Scalar/EarlyCSE.cpp:711
@@ +710,3 @@
+        ++NumDSE;
+        // can avoid incrementing the generation count since we were able to
+        // eliminate this store
----------------
Comments should be sentences (start with a capital, end with a period).

================
Comment at: test/Transforms/EarlyCSE/basic.ll:252
@@ +251,3 @@
+; CHECK-NOT: store
+; CHECK: ret i32 0
+  %v = load atomic i32, i32* %P unordered, align 4
----------------
I agree this makes sense. Regardless of what else happens (for %P == %Q), we're always free to pick an ordering in which %v == %a and where we always observe our own store, implying %a == %b.



http://reviews.llvm.org/D15397





More information about the llvm-commits mailing list