re PR tree-optimization/51684 (ICE in gfortran.dg/maxloc_bounds_5 on ia64)
authorIra Rosen <irar@il.ibm.com>
Wed, 28 Dec 2011 09:20:16 +0000 (09:20 +0000)
committerIra Rosen <irar@gcc.gnu.org>
Wed, 28 Dec 2011 09:20:16 +0000 (09:20 +0000)
        PR tree-optimization/51684
        * tree-vect-slp.c (vect_schedule_slp_instance): Get gsi of
        original statement in case of a pattern.
        (vect_schedule_slp): Likewise.

From-SVN: r182705

gcc/ChangeLog
gcc/tree-vect-slp.c

index a23b9aae9fcdb897d8691d6d3281f4fbfcb71ca7..280ca15d4d4f3fa13da821908883336dac428e68 100644 (file)
@@ -1,3 +1,10 @@
+2011-12-28  Ira Rosen  <irar@il.ibm.com>
+
+       PR tree-optimization/51684
+       * tree-vect-slp.c (vect_schedule_slp_instance): Get gsi of original
+       statement in case of a pattern.
+       (vect_schedule_slp): Likewise.
+
 2011-12-27  Eric Botcazou  <ebotcazou@adacore.com>
 
        PR rtl-optimization/51667
index 23330b2882f8deb7c1eb50dbe4e5b2df5c1916f7..91ed0c706342b44c49444b4a942f434db01805db 100644 (file)
@@ -2885,6 +2885,8 @@ vect_schedule_slp_instance (slp_tree node, slp_instance instance,
       && REFERENCE_CLASS_P (gimple_get_lhs (stmt)))
     { 
       gimple last_store = vect_find_last_store_in_slp_instance (instance);
+      if (is_pattern_stmt_p (vinfo_for_stmt (last_store)))
+       last_store = STMT_VINFO_RELATED_STMT (vinfo_for_stmt (last_store));
       si = gsi_for_stmt (last_store);
     }
 
@@ -2989,6 +2991,8 @@ vect_schedule_slp (loop_vec_info loop_vinfo, bb_vec_info bb_vinfo)
           if (!STMT_VINFO_DATA_REF (vinfo_for_stmt (store)))
             break;
 
+         if (is_pattern_stmt_p (vinfo_for_stmt (store)))
+           store = STMT_VINFO_RELATED_STMT (vinfo_for_stmt (store));
           /* Free the attached stmt_vec_info and remove the stmt.  */
           gsi = gsi_for_stmt (store);
           gsi_remove (&gsi, true);