Micro-optimize this, to speed up this hotspot in debug builds a little.

llvm-svn: 105544
This commit is contained in:
Dan Gohman 2010-06-07 19:16:37 +00:00
parent 18a4b46404
commit a2effb6452
1 changed files with 2 additions and 2 deletions

View File

@ -1168,9 +1168,9 @@ const SCEV *ScalarEvolution::getAddExpr(SmallVectorImpl<const SCEV *> &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