Def here is an Instruction, so !isa<Instruction>(Def) is always false,
authorDan Gohman <gohman@apple.com>
Fri, 13 Apr 2012 00:50:57 +0000 (00:50 +0000)
committerDan Gohman <gohman@apple.com>
Fri, 13 Apr 2012 00:50:57 +0000 (00:50 +0000)
as Eli noticed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154641 91177308-0d34-0410-b5e6-96231b3b80d8

lib/VMCore/Dominators.cpp

index b79688b31cd85d3cc95de7e20252dbcf6ba0ad2e..219e6315cf4e4adccd536afb75477c9b87082f2a 100644 (file)
@@ -189,10 +189,9 @@ bool DominatorTree::dominates(const Instruction *Def,
                               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();