From 36f25dfd33c1efae8cea4a2d6bacdff85bb8fbab Mon Sep 17 00:00:00 2001 From: Gabor Greif Date: Thu, 22 Jul 2010 11:43:44 +0000 Subject: [PATCH] pass dereferenced iterator to dyn_cast llvm-svn: 109098 --- llvm/lib/Transforms/Utils/SimplifyCFG.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp index 27b07d9731a5..36a245ff8c92 100644 --- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp +++ b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp @@ -949,7 +949,7 @@ static bool SpeculativelyExecuteBB(BranchInst *BI, BasicBlock *BB1) { UI != E; ++UI) { // Ignore any user that is not a PHI node in BB2. These can only occur in // unreachable blocks, because they would not be dominated by the instr. - PHINode *PN = dyn_cast(UI); + PHINode *PN = dyn_cast(*UI); if (!PN || PN->getParent() != BB2) return false; PHIUses.push_back(PN);