diff --git a/src/share/vm/opto/memnode.cpp b/src/share/vm/opto/memnode.cpp index 03f43d88595a8f36da2b702fa2be0e1e3c28a440..2cfa4281c484448d801b69bea067f626d4257c0d 100644 --- a/src/share/vm/opto/memnode.cpp +++ b/src/share/vm/opto/memnode.cpp @@ -1771,9 +1771,16 @@ Node *StoreCMNode::Identity( PhaseTransform *phase ) { //------------------------------Value----------------------------------------- const Type *StoreCMNode::Value( PhaseTransform *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; // If extra input is TOP ==> the result is TOP - const Type *t1 = phase->type( in(MemNode::OopStore) ); - if( t1 == Type::TOP ) return Type::TOP; + t = phase->type( in(MemNode::OopStore) ); + if( t == Type::TOP ) return Type::TOP; return StoreNode::Value( phase ); }