C2: Wrong constant in GraphKit::basic_plus_adr()

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Unresolved
    • Priority: P4
    • tbd
    • Affects Version/s: 27
    • Component/s: hotspot

      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:
            Unassigned
            Reporter:
            Vladimir Ivanov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: