changeset 47585:17676a23cf3f

8189064: Crash with compiler/codegen/*Vect.java on Solaris-sparc Summary: unconditionally call cl->mark_loop_vectorized() when vectors are generated Reviewed-by: thartmann
author kvn
date Fri, 27 Oct 2017 01:09:57 -0700
parents 32201e2d5719
children 002df709f2f2
files src/hotspot/share/opto/superword.cpp
diffstat 1 files changed, 9 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/share/opto/superword.cpp	Fri Oct 27 05:30:16 2017 +0000
+++ b/src/hotspot/share/opto/superword.cpp	Fri Oct 27 01:09:57 2017 -0700
@@ -2168,10 +2168,12 @@
   CountedLoopNode *cl = lpt()->_head->as_CountedLoop();
   Compile* C = _phase->C;
   if (_packset.length() == 0) {
-    // Instigate more unrolling for optimization when vectorization fails.
-    C->set_major_progress();
-    cl->set_notpassed_slp();
-    cl->mark_do_unroll_only();
+    if (cl->is_main_loop()) {
+      // Instigate more unrolling for optimization when vectorization fails.
+      C->set_major_progress();
+      cl->set_notpassed_slp();
+      cl->mark_do_unroll_only();
+    }
     return;
   }
 
@@ -2417,6 +2419,9 @@
   }//for (int i = 0; i < _block.length(); i++)
 
   C->set_max_vector_size(max_vlen_in_bytes);
+  if (max_vlen_in_bytes > 0) {
+    cl->mark_loop_vectorized();
+  }
 
   if (SuperWordLoopUnrollAnalysis) {
     if (cl->has_passed_slp()) {
@@ -2439,7 +2444,6 @@
         }
 
         if (do_reserve_copy()) {
-          cl->mark_loop_vectorized();
           if (can_process_post_loop) {
             // Now create the difference of trip and limit and use it as our mask index.
             // Note: We limited the unroll of the vectorized loop so that