[PATCH] D22326: [JumpThreading] PRE unordered loads

JF Bastien via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 14 11:11:10 PDT 2016


jfb added a comment.

Could you test that:

- non-atomic loads aren't forwarded to atomic loads
- non-atomic stores aren't forwarded to atomic loads (this seems useless, maybe it's valid?)

lgtm otherwise.


================
Comment at: lib/Transforms/Scalar/JumpThreading.cpp:1059
@@ +1058,3 @@
+    LoadInst *NewVal =
+        new LoadInst(LoadedPtr, LI->getName() + ".pr", /*isVolatile*/ false,
+                     LI->getAlignment(), LI->getOrdering(), LI->getSynchScope(),
----------------
Li->isVolatile() seems simpler than having the comment.


https://reviews.llvm.org/D22326





More information about the llvm-commits mailing list