summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/LazyValueInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Analysis/LazyValueInfo.cpp')
-rw-r--r--llvm/lib/Analysis/LazyValueInfo.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/llvm/lib/Analysis/LazyValueInfo.cpp b/llvm/lib/Analysis/LazyValueInfo.cpp
index 74267e045ae..0e024042f17 100644
--- a/llvm/lib/Analysis/LazyValueInfo.cpp
+++ b/llvm/lib/Analysis/LazyValueInfo.cpp
@@ -201,6 +201,7 @@ public:
return markOverdefined();
return markNotConstant(RHS.getNotConstant());
} else if (isConstantRange()) {
+ // FIXME: This could be made more precise.
return markOverdefined();
}
@@ -223,9 +224,12 @@ public:
return markConstantRange(RHS.getConstantRange());
}
- // RHS must be a constant, we must be undef, constant, or notconstant.
- assert(!isConstantRange() &&
- "Constant and ConstantRange cannot be merged.");
+ // RHS must be a constant, we must be constantrange,
+ // undef, constant, or notconstant.
+ if (isConstantRange()) {
+ // FIXME: This could be made more precise.
+ return markOverdefined();
+ }
if (isUndefined())
return markConstant(RHS.getConstant());
OpenPOWER on IntegriCloud