Def here is an Instruction, so !isa<Instruction>(Def) is always false,

as Eli noticed.

llvm-svn: 154641
This commit is contained in:
Dan Gohman 2012-04-13 00:50:57 +00:00
parent c0a906405e
commit cde3a46455

View 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();