From 1918384155530af53b458ba5fcf5882755c8b6e5 Mon Sep 17 00:00:00 2001 From: Philip Reames Date: Mon, 25 Apr 2016 22:21:24 +0000 Subject: [PATCH] [LVI] Make a precondition explicit rather than handling a case which never happens [NFC] llvm-svn: 267481 --- llvm/lib/Analysis/LazyValueInfo.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/llvm/lib/Analysis/LazyValueInfo.cpp b/llvm/lib/Analysis/LazyValueInfo.cpp index 98136b8..66b64c5 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(ICI->getOperand(1))) { + assert(ICI && "precondition"); + if (isa(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. -- 2.7.4