diff -r f1c12354c3f7 -r 6987871cfb9b src/share/vm/opto/superword.cpp --- a/src/share/vm/opto/superword.cpp Tue Aug 02 18:36:40 2011 +0200 +++ b/src/share/vm/opto/superword.cpp Wed Aug 10 14:06:57 2011 -0700 @@ -70,6 +70,8 @@ assert(lpt->_head->is_CountedLoop(), "must be"); CountedLoopNode *cl = lpt->_head->as_CountedLoop(); + if (!cl->is_valid_counted_loop()) return; // skip malformed counted loop + if (!cl->is_main_loop() ) return; // skip normal, pre, and post loops // Check for no control flow in body (other than exit)