diff -r b789bcaf2dd9 -r 76256d272075 src/share/vm/opto/escape.cpp --- a/src/share/vm/opto/escape.cpp Thu Mar 06 10:30:17 2008 -0800 +++ b/src/share/vm/opto/escape.cpp Thu Mar 06 10:53:33 2008 -0800 @@ -601,6 +601,11 @@ if (es != PointsToNode::NoEscape || !ptn._unique_type) { continue; // can't make a unique type } + if (alloc->is_Allocate()) { + // Set the scalar_replaceable flag before the next check. + alloc->as_Allocate()->_is_scalar_replaceable = true; + } + set_map(alloc->_idx, n); set_map(n->_idx, alloc); const TypeInstPtr *t = igvn->type(n)->isa_instptr();