--- old/src/share/vm/opto/lcm.cpp 2014-10-31 17:33:48.000000000 -0700 +++ new/src/share/vm/opto/lcm.cpp 2014-10-31 17:33:48.000000000 -0700 @@ -464,9 +464,7 @@ iop == Op_CreateEx || // Create-exception must start block iop == Op_CheckCastPP ) { - // select the node n - // remove n from worklist and retain the order of remaining nodes - worklist.remove((uint)i); + worklist.map(i,worklist.pop()); return n; } @@ -552,9 +550,7 @@ assert(idx >= 0, "index should be set"); Node *n = worklist[(uint)idx]; // Get the winner - // select the node n - // remove n from worklist and retain the order of remaining nodes - worklist.remove((uint)idx); + worklist.map((uint)idx, worklist.pop()); // Compress worklist return n; }