anchor.diff:      }
     }
   
  -  void emitIdentityComparison(HInstruction left, HInstruction right) {
  +  void emitIdentityComparison(HInstruction left,
  +                              HInstruction right,
  +                              bool inverse) {
       String op = singleIdentityComparison(left, right);
       if (op != null) {
         use(left);
         js.Expression jsLeft = pop();
         use(right);
  -      push(new js.Binary(op, jsLeft, pop()));
  +      push(new js.Binary(mapRelationalOperator(op, inverse), jsLeft, pop()));
       } else {
         assert(NullConstant.JsNull == 'null');
         use(left);
  
positive.code:           && right.instructionType.isUseful() && right.isInteger();
      }
  
      if (input is HBoolify && isGenerateAtUseSite(input)) {
        use(input.inputs[0]);
        push(new js.Binary("!==", pop(), newLiteralBool(true)), input);
      } else if (canGenerateOptimizedComparison(input) &&
                 isGenerateAtUseSite(input)) {
        Map<String, String> inverseOperator = const <String, String>{
          "==" : "!=",
          "!=" : "==",
          "===": "!==",
          "!==": "===",
          "<"  : ">=",
          "<=" : ">",
          ">"  : "<=",
          ">=" : "<"
        };
        HRelational relational = input;
        BinaryOperation operation = relational.operation(backend.constantSystem);
        visitRelational(input, inverseOperator[operation.name.stringValue]);
      } else {
        use(input);
        push(new js.Prefix("!", pop()));
  
negative.code:     attachLocationToLast(node);
    }
  
    static String mapRelationalOperator(String op, bool inverse) {
      Map<String, String> inverseOperator = const <String, String>{
        "==" : "!=",
        "!=" : "==",
        "===": "!==",
        "!==": "===",
        "<"  : ">=",
        "<=" : ">",
        ">"  : "<=",
        ">=" : "<"
      };
      return inverse ? inverseOperator[op] : op;
    }
  
    void generateNot(HInstruction input) {
      bool canGenerateOptimizedComparison(HInstruction instruction) {
        if (instruction is !HRelational) return false;
  