Index: runtime/vm/flow_graph_builder.cc |
diff --git a/runtime/vm/flow_graph_builder.cc b/runtime/vm/flow_graph_builder.cc |
index 236c4d9dd7ea7069257f6131573bb0871530638f..ce2e218b5d125153590e02a7581e165dcb211f26 100644 |
--- a/runtime/vm/flow_graph_builder.cc |
+++ b/runtime/vm/flow_graph_builder.cc |
@@ -762,12 +762,7 @@ bool EffectGraphVisitor::CanSkipTypeCheck(intptr_t token_pos, |
return false; |
} |
- // Propagated types are not set yet. |
- // More checks will possibly be eliminated during type propagation. |
- bool is_null, is_instance; |
- const bool eliminated = |
- (value->CanComputeIsNull(&is_null) && is_null) || |
- (value->CanComputeIsInstanceOf(dst_type, &is_instance) && is_instance); |
+ const bool eliminated = value->Type()->IsAssignableTo(dst_type); |
if (FLAG_trace_type_check_elimination) { |
FlowGraphPrinter::PrintTypeCheck(owner()->parsed_function(), |
token_pos, |