summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis
diff options
context:
space:
mode:
authorPhilip Reames <listmail@philipreames.com>2016-04-25 22:21:24 +0000
committerPhilip Reames <listmail@philipreames.com>2016-04-25 22:21:24 +0000
commit1918384155530af53b458ba5fcf5882755c8b6e5 (patch)
tree15f36d5d7c7ba89c2e750ab37f8f780871bd8582 /llvm/lib/Analysis
parenta2b9111ef7f07fe81ddf4331164785425f5d5c92 (diff)
downloadbcm5719-llvm-1918384155530af53b458ba5fcf5882755c8b6e5.tar.gz
bcm5719-llvm-1918384155530af53b458ba5fcf5882755c8b6e5.zip
[LVI] Make a precondition explicit rather than handling a case which never happens [NFC]
llvm-svn: 267481
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r--llvm/lib/Analysis/LazyValueInfo.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/LazyValueInfo.cpp b/llvm/lib/Analysis/LazyValueInfo.cpp
index 98136b86435..66b64c5c7a3 100644
--- a/llvm/lib/Analysis/LazyValueInfo.cpp
+++ b/llvm/lib/Analysis/LazyValueInfo.cpp
@@ -1116,7 +1116,8 @@ bool LazyValueInfoCache::solveBlockValueBinaryOp(LVILatticeVal &BBLV,
bool getValueFromFromCondition(Value *Val, ICmpInst *ICI,
LVILatticeVal &Result, bool isTrueDest) {
- if (ICI && isa<Constant>(ICI->getOperand(1))) {
+ assert(ICI && "precondition");
+ if (isa<Constant>(ICI->getOperand(1))) {
if (ICI->isEquality() && ICI->getOperand(0) == Val) {
// We know that V has the RHS constant if this is a true SETEQ or
// false SETNE.
OpenPOWER on IntegriCloud