Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8279947

Remove two redundant gvn.transform calls in Parse::do_one_bytecode()

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 19
    • 17, 19
    • hotspot
    • b06

      The following two gvn.transform calls seem to be redundant.
      It would be better to remove them.

      ```
        case Bytecodes::_l2f:
          if (Matcher::convL2FSupported()) {
            a = pop_pair();
            b = _gvn.transform( new ConvL2FNode(a));
            // For x86_32.ad, FILD doesn't restrict precision to 24 or 53 bits.
            // Rather than storing the result into an FP register then pushing
            // out to memory to round, the machine instruction that implements
            // ConvL2D is responsible for rounding.
            // c = precision_rounding(b);
            c = _gvn.transform(b); <-------- redundant
            push(c);
          } else {
            l2f();
          }
          break;

        case Bytecodes::_l2d:
          a = pop_pair();
          b = _gvn.transform( new ConvL2DNode(a));
          // For x86_32.ad, rounding is always necessary (see _l2f above).
          // c = dprecision_rounding(b);
          c = _gvn.transform(b); <------- redundant
          push_pair(c);
          break;
      ```

            jiefu Jie Fu
            jiefu Jie Fu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: