mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-23 22:29:55 +00:00
8262093: java/util/concurrent/tck/JSR166TestCase.java failed "assert(false) failed: unexpected node"
Reviewed-by: thartmann
This commit is contained in:
parent
815248ab27
commit
e073486ffe
@ -4206,7 +4206,7 @@ Node* GraphKit::compress_string(Node* src, const TypeAryPtr* src_type, Node* dst
|
||||
// LoadB -> compress_string -> MergeMem(CharMem, StoreB(ByteMem))
|
||||
Node* mem = capture_memory(src_type, TypeAryPtr::BYTES);
|
||||
StrCompressedCopyNode* str = new StrCompressedCopyNode(control(), mem, src, dst, count);
|
||||
Node* res_mem = _gvn.transform(new SCMemProjNode(str));
|
||||
Node* res_mem = _gvn.transform(new SCMemProjNode(_gvn.transform(str)));
|
||||
set_memory(res_mem, TypeAryPtr::BYTES);
|
||||
return str;
|
||||
}
|
||||
|
||||
@ -196,7 +196,11 @@ static Node *scan_mem_chain(Node *mem, int alias_idx, int offset, Node *start_me
|
||||
}
|
||||
mem = in->in(TypeFunc::Memory);
|
||||
} else {
|
||||
#ifdef ASSERT
|
||||
in->dump();
|
||||
mem->dump();
|
||||
assert(false, "unexpected projection");
|
||||
#endif
|
||||
}
|
||||
} else if (mem->is_Store()) {
|
||||
const TypePtr* atype = mem->as_Store()->adr_type();
|
||||
@ -207,8 +211,9 @@ static Node *scan_mem_chain(Node *mem, int alias_idx, int offset, Node *start_me
|
||||
uint adr_iid = atype->is_oopptr()->instance_id();
|
||||
// Array elements references have the same alias_idx
|
||||
// but different offset and different instance_id.
|
||||
if (adr_offset == offset && adr_iid == alloc->_idx)
|
||||
if (adr_offset == offset && adr_iid == alloc->_idx) {
|
||||
return mem;
|
||||
}
|
||||
} else {
|
||||
assert(adr_idx == Compile::AliasIdxRaw, "address must match or be raw");
|
||||
}
|
||||
@ -222,10 +227,11 @@ static Node *scan_mem_chain(Node *mem, int alias_idx, int offset, Node *start_me
|
||||
InitializeNode* init = alloc->as_Allocate()->initialization();
|
||||
// We are looking for stored value, return Initialize node
|
||||
// or memory edge from Allocate node.
|
||||
if (init != NULL)
|
||||
if (init != NULL) {
|
||||
return init;
|
||||
else
|
||||
} else {
|
||||
return alloc->in(TypeFunc::Memory); // It will produce zero value (see callers).
|
||||
}
|
||||
}
|
||||
// Otherwise skip it (the call updated 'mem' value).
|
||||
} else if (mem->Opcode() == Op_SCMemProj) {
|
||||
@ -420,10 +426,8 @@ Node *PhaseMacroExpand::value_from_mem_phi(Node *mem, BasicType ft, const Type *
|
||||
}
|
||||
values.at_put(j, res);
|
||||
} else {
|
||||
#ifdef ASSERT
|
||||
val->dump();
|
||||
DEBUG_ONLY( val->dump(); )
|
||||
assert(false, "unknown node on this path");
|
||||
#endif
|
||||
return NULL; // unknown node on this path
|
||||
}
|
||||
}
|
||||
@ -500,6 +504,7 @@ Node *PhaseMacroExpand::value_from_mem(Node *sfpt_mem, Node *sfpt_ctl, BasicType
|
||||
} else if (mem->is_ArrayCopy()) {
|
||||
done = true;
|
||||
} else {
|
||||
DEBUG_ONLY( mem->dump(); )
|
||||
assert(false, "unexpected node");
|
||||
}
|
||||
}
|
||||
|
||||
@ -2969,18 +2969,13 @@ Node *StoreCMNode::Ideal(PhaseGVN *phase, bool can_reshape){
|
||||
|
||||
//------------------------------Value-----------------------------------------
|
||||
const Type* StoreCMNode::Value(PhaseGVN* phase) const {
|
||||
// Either input is TOP ==> the result is TOP
|
||||
const Type *t = phase->type( in(MemNode::Memory) );
|
||||
if( t == Type::TOP ) return Type::TOP;
|
||||
t = phase->type( in(MemNode::Address) );
|
||||
if( t == Type::TOP ) return Type::TOP;
|
||||
t = phase->type( in(MemNode::ValueIn) );
|
||||
if( t == Type::TOP ) return Type::TOP;
|
||||
// Either input is TOP ==> the result is TOP (checked in StoreNode::Value).
|
||||
// If extra input is TOP ==> the result is TOP
|
||||
t = phase->type( in(MemNode::OopStore) );
|
||||
if( t == Type::TOP ) return Type::TOP;
|
||||
|
||||
return StoreNode::Value( phase );
|
||||
const Type* t = phase->type(in(MemNode::OopStore));
|
||||
if (t == Type::TOP) {
|
||||
return Type::TOP;
|
||||
}
|
||||
return StoreNode::Value(phase);
|
||||
}
|
||||
|
||||
|
||||
@ -2988,6 +2983,9 @@ const Type* StoreCMNode::Value(PhaseGVN* phase) const {
|
||||
//----------------------------------SCMemProjNode------------------------------
|
||||
const Type* SCMemProjNode::Value(PhaseGVN* phase) const
|
||||
{
|
||||
if (in(0) == NULL || phase->type(in(0)) == Type::TOP) {
|
||||
return Type::TOP;
|
||||
}
|
||||
return bottom_type();
|
||||
}
|
||||
|
||||
@ -3006,6 +3004,27 @@ LoadStoreNode::LoadStoreNode( Node *c, Node *mem, Node *adr, Node *val, const Ty
|
||||
init_class_id(Class_LoadStore);
|
||||
}
|
||||
|
||||
//------------------------------Value-----------------------------------------
|
||||
const Type* LoadStoreNode::Value(PhaseGVN* phase) const {
|
||||
// Either input is TOP ==> the result is TOP
|
||||
if (!in(MemNode::Control) || phase->type(in(MemNode::Control)) == Type::TOP) {
|
||||
return Type::TOP;
|
||||
}
|
||||
const Type* t = phase->type(in(MemNode::Memory));
|
||||
if (t == Type::TOP) {
|
||||
return Type::TOP;
|
||||
}
|
||||
t = phase->type(in(MemNode::Address));
|
||||
if (t == Type::TOP) {
|
||||
return Type::TOP;
|
||||
}
|
||||
t = phase->type(in(MemNode::ValueIn));
|
||||
if (t == Type::TOP) {
|
||||
return Type::TOP;
|
||||
}
|
||||
return bottom_type();
|
||||
}
|
||||
|
||||
uint LoadStoreNode::ideal_reg() const {
|
||||
return _type->ideal_reg();
|
||||
}
|
||||
@ -3051,6 +3070,15 @@ LoadStoreConditionalNode::LoadStoreConditionalNode( Node *c, Node *mem, Node *ad
|
||||
init_req(ExpectedIn, ex );
|
||||
}
|
||||
|
||||
const Type* LoadStoreConditionalNode::Value(PhaseGVN* phase) const {
|
||||
// Either input is TOP ==> the result is TOP
|
||||
const Type* t = phase->type(in(ExpectedIn));
|
||||
if (t == Type::TOP) {
|
||||
return Type::TOP;
|
||||
}
|
||||
return LoadStoreNode::Value(phase);
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
//-------------------------------adr_type--------------------------------------
|
||||
const TypePtr* ClearArrayNode::adr_type() const {
|
||||
|
||||
@ -849,6 +849,7 @@ public:
|
||||
virtual const Type *bottom_type() const { return _type; }
|
||||
virtual uint ideal_reg() const;
|
||||
virtual const class TypePtr *adr_type() const { return _adr_type; } // returns bottom_type of address
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
|
||||
bool result_not_used() const;
|
||||
MemBarNode* trailing_membar() const;
|
||||
@ -863,6 +864,7 @@ public:
|
||||
ExpectedIn = MemNode::ValueIn+1 // One more input than MemNode
|
||||
};
|
||||
LoadStoreConditionalNode(Node *c, Node *mem, Node *adr, Node *val, Node *ex);
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
};
|
||||
|
||||
//------------------------------StorePConditionalNode---------------------------
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user