From: Dan Gohman Date: Mon, 7 Jun 2010 19:16:37 +0000 (+0000) Subject: Micro-optimize this, to speed up this hotspot in debug builds a little. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=1f23d63ddf6d931f687a37ddadb76c2f37ffbef6;p=oota-llvm.git Micro-optimize this, to speed up this hotspot in debug builds a little. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105544 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp index 08831dfd227..ab909397af1 100644 --- a/lib/Analysis/ScalarEvolution.cpp +++ b/lib/Analysis/ScalarEvolution.cpp @@ -1168,9 +1168,9 @@ const SCEV *ScalarEvolution::getAddExpr(SmallVectorImpl &Ops, assert(!Ops.empty() && "Cannot get empty add!"); if (Ops.size() == 1) return Ops[0]; #ifndef NDEBUG + const Type *ETy = getEffectiveSCEVType(Ops[0]->getType()); for (unsigned i = 1, e = Ops.size(); i != e; ++i) - assert(getEffectiveSCEVType(Ops[i]->getType()) == - getEffectiveSCEVType(Ops[0]->getType()) && + assert(getEffectiveSCEVType(Ops[i]->getType()) == ETy && "SCEVAddExpr operand types don't match!"); #endif