hotspot/src/share/vm/opto/loopopts.cpp
changeset 35545 a8f29dfd62b2
parent 34174 4db2fb26dc49
child 35574 2b25eb88c8d6
--- a/hotspot/src/share/vm/opto/loopopts.cpp	Fri Dec 18 20:23:28 2015 +0300
+++ b/hotspot/src/share/vm/opto/loopopts.cpp	Fri Dec 11 16:57:08 2015 +0100
@@ -26,6 +26,7 @@
 #include "memory/allocation.inline.hpp"
 #include "opto/addnode.hpp"
 #include "opto/connode.hpp"
+#include "opto/castnode.hpp"
 #include "opto/divnode.hpp"
 #include "opto/loopnode.hpp"
 #include "opto/matcher.hpp"
@@ -900,6 +901,14 @@
   Node *m = remix_address_expressions( n );
   if( m ) return m;
 
+  if (n->is_ConstraintCast()) {
+    Node* dom_cast = n->as_ConstraintCast()->dominating_cast(this);
+    if (dom_cast != NULL) {
+      _igvn.replace_node(n, dom_cast);
+      return dom_cast;
+    }
+  }
+
   // Determine if the Node has inputs from some local Phi.
   // Returns the block to clone thru.
   Node *n_blk = has_local_phi_input( n );