[PATCH] D39637: [GVN PRE] Patch the source for Phi node in PRE

Serguei Katkov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 8 20:16:54 PST 2017


skatkov added inline comments.


================
Comment at: lib/Transforms/Scalar/GVN.cpp:2292
+    if (Value *V = predMap[i].first) {
+      // We plan to use V instead of CurInst, so patch it.
+      patchReplacementInstruction(CurInst, V);
----------------
dberlin wrote:
> Please replace this comment with "If we use an existing value in this phi, we have to patch the original value because the phi will be used to replace a later value"
will do before landing or if I need to update a patch.


https://reviews.llvm.org/D39637





More information about the llvm-commits mailing list