summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-06-07 19:16:37 +0000
committerDan Gohman <gohman@apple.com>2010-06-07 19:16:37 +0000
commita2effb6452737a5038c625393a59c09a9eeb0c94 (patch)
treef6e98a74e61f734de28c20092a1e6c06f1dff087 /llvm/lib
parent18a4b46404e854ee419cb689505fbe079ec93865 (diff)
downloadbcm5719-llvm-a2effb6452737a5038c625393a59c09a9eeb0c94.tar.gz
bcm5719-llvm-a2effb6452737a5038c625393a59c09a9eeb0c94.zip
Micro-optimize this, to speed up this hotspot in debug builds a little.
llvm-svn: 105544
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Analysis/ScalarEvolution.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp
index 08831dfd227..ab909397af1 100644
--- a/llvm/lib/Analysis/ScalarEvolution.cpp
+++ b/llvm/lib/Analysis/ScalarEvolution.cpp
@@ -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
OpenPOWER on IntegriCloud