[PATCH] D28126: [MemDep] Handle gep with zeros for invariant.group

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 30 09:52:41 PST 2016


reames accepted this revision.
reames added a reviewer: reames.
reames added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: lib/Analysis/MemoryDependenceAnalysis.cpp:368
 
-    if (auto *BCI = dyn_cast<BitCastInst>(Ptr)) {
-      if (Seen.insert(BCI->getOperand(0)).second) {
-        LoadOperandsQueue.push_back(BCI->getOperand(0));
-      }
-    }
-
-    for (Use &Us : Ptr->uses()) {
+    // Value comes from bitcast: Ptr = bitcast x. Insert x.
+    if (auto *BCI = dyn_cast<BitCastInst>(Ptr))
----------------
minor: walking back the def chain could be handled by a call to stripPointerCasts.  This can be a following cleanup change,


https://reviews.llvm.org/D28126





More information about the llvm-commits mailing list