C2: verify AddP base input only set for heap addresses

XMLWordPrintable

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

      diff --git a/src/hotspot/share/opto/addnode.hpp b/src/hotspot/share/opto/addnode.hpp
      index 28ed73121ed..4f810bc6a2a 100644
      --- a/src/hotspot/share/opto/addnode.hpp
      +++ b/src/hotspot/share/opto/addnode.hpp
      @@ -228,6 +228,7 @@ class AddPNode : public Node {
                Offset } ; // Offset added to address
         AddPNode( Node *base, Node *ptr, Node *off ) : Node(nullptr,base,ptr,off) {
           init_class_id(Class_AddP);
      + assert((ptr->bottom_type() == Type::TOP) || ((base == Compile::current()->top()) == (ptr->bottom_type()->make_ptr()->isa_oopptr() == nullptr)), "");
         }
         virtual int Opcode() const;
         virtual Node* Identity(PhaseGVN* phase);

            Assignee:
            Roland Westrelin
            Reporter:
            Roland Westrelin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: