| Index: lib/compiler/implementation/ssa/optimize.dart
|
| diff --git a/lib/compiler/implementation/ssa/optimize.dart b/lib/compiler/implementation/ssa/optimize.dart
|
| index 1a69ff7167bc060db25384d73a97d34737e8eef6..9ea146f623e1625bacb3b3a058778351c50cc5e3 100644
|
| --- a/lib/compiler/implementation/ssa/optimize.dart
|
| +++ b/lib/compiler/implementation/ssa/optimize.dart
|
| @@ -1000,10 +1000,10 @@ class SsaCodeMotion extends HBaseVisitor implements OptimizationPhase {
|
| void visitBasicBlock(HBasicBlock block) {
|
| List<HBasicBlock> successors = block.successors;
|
|
|
| - // Phase 1: get the ValueSet of all successors, compute the
|
| - // intersection and move the instructions of the intersection into
|
| - // this block.
|
| - if (successors.length != 0) {
|
| + // Phase 1: get the ValueSet of all successors (if there are more than one),
|
| + // compute the intersection and move the instructions of the intersection
|
| + // into this block.
|
| + if (successors.length > 1) {
|
| ValueSet instructions = values[successors[0].id];
|
| for (int i = 1; i < successors.length; i++) {
|
| ValueSet other = values[successors[i].id];
|
|
|