C2: verify that adr_type and adr's type match in LoadNode::make and StoreNode::make

XMLWordPrintable

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

      diff --git a/src/hotspot/share/opto/memnode.cpp b/src/hotspot/share/opto/memnode.cpp
      index 61300ab4fcb..c8d6b42e517 100644
      --- a/src/hotspot/share/opto/memnode.cpp
      +++ b/src/hotspot/share/opto/memnode.cpp
      @@ -947,6 +947,7 @@ bool LoadNode::is_immutable_value(Node* adr) {
       Node* LoadNode::make(PhaseGVN& gvn, Node* ctl, Node* mem, Node* adr, const TypePtr* adr_type, const Type* rt, BasicType bt, MemOrd mo,
                            ControlDependency control_dependency, bool require_atomic_access, bool unaligned, bool mismatched, bool unsafe, uint8_t barrier_data) {
         Compile* C = gvn.C;
      + assert(C->get_alias_index(gvn.type(adr)->is_ptr()) == C->get_alias_index(adr_type), "");
       
         // sanity check the alias category against the created node type
         assert(!(adr_type->isa_oopptr() &&
      @@ -2688,6 +2689,7 @@ Node* LoadRangeNode::Identity(PhaseGVN* phase) {
       StoreNode* StoreNode::make(PhaseGVN& gvn, Node* ctl, Node* mem, Node* adr, const TypePtr* adr_type, Node* val, BasicType bt, MemOrd mo, bool require_atomic_access) {
         assert((mo == unordered || mo == release), "unexpected");
         Compile* C = gvn.C;
      + assert(adr_type == nullptr || C->get_alias_index(gvn.type(adr)->is_ptr()) == C->get_alias_index(adr_type), "");
         assert(C->get_alias_index(adr_type) != Compile::AliasIdxRaw ||
                ctl != nullptr, "raw memory operations should have control edge");
       

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

              Created:
              Updated: