[llvm-commits] [llvm] r154641 - /llvm/trunk/lib/VMCore/Dominators.cpp

Dan Gohman gohman at apple.com
Thu Apr 12 17:50:58 PDT 2012


Author: djg
Date: Thu Apr 12 19:50:57 2012
New Revision: 154641

URL: http://llvm.org/viewvc/llvm-project?rev=154641&view=rev
Log:
Def here is an Instruction, so !isa<Instruction>(Def) is always false,
as Eli noticed.

Modified:
    llvm/trunk/lib/VMCore/Dominators.cpp

Modified: llvm/trunk/lib/VMCore/Dominators.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Dominators.cpp?rev=154641&r1=154640&r2=154641&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Dominators.cpp (original)
+++ llvm/trunk/lib/VMCore/Dominators.cpp Thu Apr 12 19:50:57 2012
@@ -189,10 +189,9 @@
                               const Use &U) const {
   Instruction *UserInst = dyn_cast<Instruction>(U.getUser());
 
-  // All non-instructions conceptually dominate everything. Instructions do
-  // not dominate non-instructions.
+  // Instructions do not dominate non-instructions.
   if (!UserInst)
-    return !isa<Instruction>(Def);
+    return false;
 
   const BasicBlock *DefBB = Def->getParent();
 





More information about the llvm-commits mailing list