hotspot/src/share/vm/opto/loopnode.cpp
changeset 35549 3415401a6b6e
parent 35140 744774d641ff
child 35551 36ef3841fb34
--- a/hotspot/src/share/vm/opto/loopnode.cpp	Mon Jan 11 14:23:35 2016 +0100
+++ b/hotspot/src/share/vm/opto/loopnode.cpp	Mon Jan 11 16:33:27 2016 +0100
@@ -815,6 +815,11 @@
 
   C->print_method(PHASE_AFTER_CLOOPS, 3);
 
+  // Capture bounds of the loop in the induction variable Phi before
+  // subsequent transformation (iteration splitting) obscures the
+  // bounds
+  l->phi()->as_Phi()->set_type(l->phi()->Value(&_igvn));
+
   return true;
 }
 
@@ -3483,7 +3488,7 @@
 // Second pass finds latest legal placement, and ideal loop placement.
 void PhaseIdealLoop::build_loop_late_post( Node *n ) {
 
-  if (n->req() == 2 && n->Opcode() == Op_ConvI2L && !C->major_progress() && !_verify_only) {
+  if (n->req() == 2 && (n->Opcode() == Op_ConvI2L || n->Opcode() == Op_CastII) && !C->major_progress() && !_verify_only) {
     _igvn._worklist.push(n);  // Maybe we'll normalize it, if no more loops.
   }