| Index: pkg/compiler/lib/src/tree_ir/optimization/loop_rewriter.dart
|
| diff --git a/pkg/compiler/lib/src/tree_ir/optimization/loop_rewriter.dart b/pkg/compiler/lib/src/tree_ir/optimization/loop_rewriter.dart
|
| index c4611570fd63e18dd7b68df0f8b813549b3ac33b..a25d47f9d27d0ffa0212e0a320059cf28ffb122c 100644
|
| --- a/pkg/compiler/lib/src/tree_ir/optimization/loop_rewriter.dart
|
| +++ b/pkg/compiler/lib/src/tree_ir/optimization/loop_rewriter.dart
|
| @@ -43,7 +43,8 @@ class LoopRewriter extends RecursiveVisitor with PassMixin {
|
|
|
| Statement visitAssign(Assign node) {
|
| // Clean up redundant assignments left behind in the previous phase.
|
| - if (node.variable == node.definition) {
|
| + Expression def = node.definition;
|
| + if (def is VariableUse && node.variable == def.variable) {
|
| --node.variable.readCount;
|
| --node.variable.writeCount;
|
| return visitStatement(node.next);
|
|
|