projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
PR14904: Segmentation fault running pass 'Recognize loop idioms'
[oota-llvm.git]
/
lib
/
Transforms
/
Scalar
/
LoopIdiomRecognize.cpp
diff --git
a/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
b/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
index c4f90125ac5a05e1d4f7cda2d05d511c05615ccd..8258719a0200b3d090b4057250b714e01ac59b41 100644
(file)
--- a/
lib/Transforms/Scalar/LoopIdiomRecognize.cpp
+++ b/
lib/Transforms/Scalar/LoopIdiomRecognize.cpp
@@
-407,7
+407,7
@@
bool NclPopcountRecognize::detectIdiom(Instruction *&CntInst,
// step 2: detect instructions corresponding to "x2 = x1 & (x1 - 1)"
{
- if (DefX2->getOpcode() != Instruction::And)
+ if (
!DefX2 ||
DefX2->getOpcode() != Instruction::And)
return false;
BinaryOperator *SubOneOp;