[PATCH] D15337: [EarlyCSE] Value forwarding for unordered atomics
Daniel Berlin via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 8 10:17:01 PST 2015
dberlin added a comment.
At a glance, this looks correct to me, and to be honest, Phillip almost certainly understands atomics better than I do ;)
================
Comment at: lib/Transforms/Scalar/EarlyCSE.cpp:624
@@ -578,1 +623,3 @@
+ // We can't replace an atomic load with one which isn't also atomic.
+ InVal.IsAtomic >= MemInst.isAtomic()) {
Value *Op = getOrCreateResult(InVal.Data, Inst->getType());
----------------
At least at a glance, this looks like you compare a bool with a bool using >=, which is pretty confusing?
http://reviews.llvm.org/D15337
More information about the llvm-commits
mailing list