| Index: sdk/lib/_internal/compiler/implementation/ssa/optimize.dart
|
| ===================================================================
|
| --- sdk/lib/_internal/compiler/implementation/ssa/optimize.dart (revision 26189)
|
| +++ sdk/lib/_internal/compiler/implementation/ssa/optimize.dart (working copy)
|
| @@ -1040,7 +1040,10 @@
|
| HBasicBlock preheader = loopHeader.predecessors[0];
|
| int dependsFlags = SideEffects.computeDependsOnFlags(changesFlags);
|
| HInstruction instruction = block.first;
|
| - bool firstInstructionInLoop = block == loopHeader;
|
| + bool firstInstructionInLoop = block == loopHeader
|
| + // Compensate for lack of code motion.
|
| + || (blockChangesFlags[loopHeader.id] == 0
|
| + && loopHeader.successors[0] == block);
|
| while (instruction != null) {
|
| HInstruction next = instruction.next;
|
| if (instruction.useGvn()
|
|
|