anchor.diff:        }
       }
       return true;
  +  }
  +
  +  HInstruction previousInstruction(HInstruction instruction) {
  +    if (instruction.previous != null) return instruction.previous;
  +    HBasicBlock block = instruction.block;
  +    if (instruction is! HPhi) {
  +      if (block.phis.last != null) return block.phis.last;
  +    }
  +    if (block.predecessors.length == 1) {
  +      HBasicBlock previousBlock = block.predecessors[0];
  +      if (previousBlock.last is HGoto) {
  +        assert(previousBlock.successors.length == 1);
  +        assert(previousBlock.successors[0] === block);
  +        return previousInstruction(previousBlock.last);
  +      }
  +    }
  +    return null;
     }
   
     void detectLogicControlFlow(HPhi phi) {
  
positive.code:    * generated at use-site.
     */
    bool isExpression(HInstruction instruction, HBasicBlock limit) {
      if (instruction is HPhi && !logicalOperations.containsKey(instruction)) {
        return false;
      }
      while (instruction.previous != null) {
        instruction = instruction.previous;
        if (!generateAtUseSite.contains(instruction)) {
          return false;
        }
      }
      HBasicBlock block = instruction.block;
      if (!block.phis.isEmpty()) return false;
      if (instruction is HPhi && logicalOperations.containsKey(instruction)) {
        return isExpression(instruction.inputs[0], limit);
      }
      return block.predecessors.length == 1 && block.predecessors[0] == limit;
    }
  
    void replaceWithLogicalOperator(HPhi phi, String type) {
      if (canGenerateAtUseSite(phi)) generateAtUseSite.add(phi);
      logicalOperations[phi] = type;
    }
  
    bool canGenerateAtUseSite(HPhi phi) {
      if (phi.usedBy.length != 1) return false;
      assert(phi.next == null);
      HInstruction use = phi.usedBy[0];
  
      HInstruction current = phi.block.first;
      while (current != use) {
        if (!generateAtUseSite.contains(current)) return false;
        if (current.next != null) {
          current = current.next;
        } else if (current is HPhi) {
          current = current.block.first;
        } else {
          assert(current is HControlFlow);
          if (current is !HGoto) return false;
          HBasicBlock nextBlock = current.block.successors[0];
          if (!nextBlock.phis.isEmpty()) {
            current = nextBlock.phis.first;
  
negative.code:     //   |/
      //   B2 b2 = phi(b0,b1); if(b2) ...
      // TODO(lrn): Also recognize ?:-flow?
      if (phi.inputs.length != 2) return;
      HInstruction first = phi.inputs[0];
      HBasicBlock firstBlock = phi.block.predecessors[0];
      HInstruction second = phi.inputs[1];
      HBasicBlock secondBlock = phi.block.predecessors[1];
      // Check second input of phi being an expression followed by a goto.
      if (second.usedBy.length != 1) return;
      HInstruction secondNext =
  