C2: Wrong constant in GraphKit::basic_plus_adr()

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 27
    • Affects Version/s: 27
    • Component/s: hotspot
    • master

      A shortcut for a common case is broken in GraphKit::basic_plus_adr():

      src/hotspot/share/opto/graphKit.cpp:
      Node* GraphKit::basic_plus_adr(Node* base, Node* ptr, Node* offset) {
        // short-circuit a common case
        if (offset == intcon(0)) return ptr;
        return _gvn.transform( new AddPNode(base, ptr, offset) );
      }

      On 64-bit systems offset is a long and not an int.

            Assignee:
            Brian Stafford
            Reporter:
            Vladimir Ivanov
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: