aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/ScalarEvolution.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Analysis/ScalarEvolution.cpp')
-rw-r--r--llvm/lib/Analysis/ScalarEvolution.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp
index 5a994ae..7c234fa 100644
--- a/llvm/lib/Analysis/ScalarEvolution.cpp
+++ b/llvm/lib/Analysis/ScalarEvolution.cpp
@@ -9941,10 +9941,7 @@ const SCEV *ScalarEvolution::computeSCEVAtScope(const SCEV *V, const Loop *L) {
Constant *C = BuildConstantFromSCEV(OpV);
if (!C)
return V;
- if (C->getType() != Op->getType())
- C = ConstantExpr::getCast(
- CastInst::getCastOpcode(C, false, Op->getType(), false), C,
- Op->getType());
+ assert(C->getType() == Op->getType() && "Type mismatch");
Operands.push_back(C);
}