[PATCH] D39781: [GVNHoist] Fix: PR35222 gvn-hoist incorrectly erases load

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 7 22:49:28 PST 2017


efriedma added inline comments.


================
Comment at: lib/Transforms/Scalar/GVNHoist.cpp:802
+          if (DT->dominates(IDFB, V[i]->getParent()) && // Ignore spurious PDFs.
+              LInfo->getLoopFor(IDFB) == LInfo->getLoopFor(B)) {
             OutValue[IDFB].push_back(C);
----------------
I haven't reviewed in detail, but I'm skeptical this check actually does the right thing in general.  A "Loop*" is specifically a loop with a single entry point, so this check won't handle irreducible control flow correctly.


https://reviews.llvm.org/D39781





More information about the llvm-commits mailing list