Index: runtime/vm/intermediate_language.cc |
diff --git a/runtime/vm/intermediate_language.cc b/runtime/vm/intermediate_language.cc |
index 292d6aaf0ed60460eeddbbff82f3a1d36ab2a8f6..3bf99bd6052bce7e781d0cd08bf4cb879c711db8 100644 |
--- a/runtime/vm/intermediate_language.cc |
+++ b/runtime/vm/intermediate_language.cc |
@@ -2039,6 +2039,14 @@ void LoadIndexedInstr::InferRange() { |
} |
+void IfThenElseInstr::InferRange() { |
+ const intptr_t min = Utils::Minimum(if_true_, if_false_); |
+ const intptr_t max = Utils::Maximum(if_true_, if_false_); |
+ range_ = new Range(RangeBoundary::FromConstant(min), |
+ RangeBoundary::FromConstant(max)); |
+} |
+ |
+ |
void PhiInstr::InferRange() { |
RangeBoundary new_min; |
RangeBoundary new_max; |