aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Transforms/Scalar/LoopIdiomRecognize.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/LoopIdiomRecognize.cpp b/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
index 153fedf2c3..8f929941d5 100644
--- a/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
+++ b/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
@@ -455,7 +455,7 @@ bool NclPopcountRecognize::detectIdiom(Instruction *&CntInst,
continue;
PHINode *Phi = dyn_cast<PHINode>(Inst->getOperand(0));
- if (!Phi && Phi->getParent() != LoopEntry)
+ if (!Phi || Phi->getParent() != LoopEntry)
continue;
// Check if the result of the instruction is live of the loop.