8129893: 8129094 fix is incomplete
authorkvn
Tue, 30 Jun 2015 12:12:18 -0700
changeset 31520 4a6cbcae9f46
parent 31519 bb26c50aadd0
child 31521 f57b2ce43484
8129893: 8129094 fix is incomplete Summary: move old and add new primitive type check. Reviewed-by: iveresov
hotspot/src/share/vm/opto/superword.cpp
--- a/hotspot/src/share/vm/opto/superword.cpp	Mon Jun 15 15:27:04 2015 +0300
+++ b/hotspot/src/share/vm/opto/superword.cpp	Tue Jun 30 12:12:18 2015 -0700
@@ -183,13 +183,20 @@
       break;
     }
 
+    // Ignore nodes with non-primitive type.
+    BasicType bt;
+    if (n->is_Mem()) {
+      bt = n->as_Mem()->memory_type();
+    } else {
+      bt = n->bottom_type()->basic_type();
+    }
+    if (is_java_primitive(bt) == false) {
+      ignored_loop_nodes[i] = n->_idx;
+      continue;
+    }
+
     if (n->is_Mem()) {
       MemNode* current = n->as_Mem();
-      BasicType bt = current->memory_type();
-      if (is_java_primitive(bt) == false) {
-        ignored_loop_nodes[i] = n->_idx;
-        continue;
-      }
       Node* adr = n->in(MemNode::Address);
       Node* n_ctrl = _phase->get_ctrl(adr);
 
@@ -231,11 +238,12 @@
 
       BasicType bt;
       Node* n = lpt()->_body.at(i);
-      if (n->is_Store()) {
+      if (n->is_Mem()) {
         bt = n->as_Mem()->memory_type();
       } else {
         bt = n->bottom_type()->basic_type();
       }
+      if (is_java_primitive(bt) == false) continue;
 
       int cur_max_vector = Matcher::max_vector_size(bt);