7043552: regression after 7042327
Summary: Generate Opaque2 node only during first unroll.
Reviewed-by: never
--- a/hotspot/src/share/vm/opto/loopTransform.cpp Tue May 10 00:45:03 2011 -0700
+++ b/hotspot/src/share/vm/opto/loopTransform.cpp Tue May 10 12:57:21 2011 -0700
@@ -1230,7 +1230,7 @@
set_ctrl(new_limit, C->root());
} else {
// Limit is not constant.
- {
+ if (loop_head->unrolled_count() == 1) { // only for first unroll
// Separate limit by Opaque node in case it is an incremented
// variable from previous loop to avoid using pre-incremented
// value which could increase register pressure.