projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8f767d9
)
ConstantFoldInstOperands can theoretically return null if it
author
Dan Gohman
<gohman@apple.com>
Wed, 24 Feb 2010 19:31:47 +0000
(19:31 +0000)
committer
Dan Gohman
<gohman@apple.com>
Wed, 24 Feb 2010 19:31:47 +0000
(19:31 +0000)
didn't fold anything.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97049
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Analysis/ScalarEvolution.cpp
patch
|
blob
|
history
diff --git
a/lib/Analysis/ScalarEvolution.cpp
b/lib/Analysis/ScalarEvolution.cpp
index 7fb2e5e7539b111765cc3019521c0e370984af61..5bad4b2972e753a7fc38c7978b11913dac0f63d1 100644
(file)
--- a/
lib/Analysis/ScalarEvolution.cpp
+++ b/
lib/Analysis/ScalarEvolution.cpp
@@
-4226,14
+4226,15
@@
const SCEV *ScalarEvolution::computeSCEVAtScope(const SCEV *V, const Loop *L) {
}
}
- Constant *C;
+ Constant *C
= 0
;
if (const CmpInst *CI = dyn_cast<CmpInst>(I))
C = ConstantFoldCompareInstOperands(CI->getPredicate(),
Operands[0], Operands[1], TD);
else
C = ConstantFoldInstOperands(I->getOpcode(), I->getType(),
&Operands[0], Operands.size(), TD);
- return getSCEV(C);
+ if (C)
+ return getSCEV(C);
}
}