[PATCH] D38765: Don't replace constants with constants in GVN

Daniel Berlin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 10 20:58:05 PDT 2017


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

Okay if you address the remaining comments.
Thanks!



================
Comment at: lib/Transforms/Scalar/GVN.cpp:1365
     return false;
+  } else if (isa<Constant>(V)) {
+    return false;
----------------
Can you add a comment saying "if it's not false, and constant, it must evaluate to true. This means our assume  is assume(true), and thus, pointless, and we don't want to do anything more here"

or something similar.



https://reviews.llvm.org/D38765





More information about the llvm-commits mailing list