summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2012-04-13 00:50:57 +0000
committerDan Gohman <gohman@apple.com>2012-04-13 00:50:57 +0000
commit0120f7913fc7eee98ac16052e02466c1c50abd9b (patch)
tree57ac397860ebfa7629c53102eeace3d3c12eeea4
parent558ece284cef9d42a96577f3943cb3efee8904e0 (diff)
downloadllvm-0120f7913fc7eee98ac16052e02466c1c50abd9b.tar.gz
llvm-0120f7913fc7eee98ac16052e02466c1c50abd9b.tar.bz2
llvm-0120f7913fc7eee98ac16052e02466c1c50abd9b.tar.xz
Def here is an Instruction, so !isa<Instruction>(Def) is always false,
as Eli noticed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154641 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/VMCore/Dominators.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/VMCore/Dominators.cpp b/lib/VMCore/Dominators.cpp
index b79688b31c..219e6315cf 100644
--- a/lib/VMCore/Dominators.cpp
+++ b/lib/VMCore/Dominators.cpp
@@ -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();