| 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 b78122b72428cd6fec6b1441b6419d7a7c86840a..0913a117172b7e3ea4c3bf6f168d5cf115606418 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);
|
|
|