tree-optimization/96978 - fix fallout of BB vectorization of live stmts
authorRichard Biener <rguenther@suse.de>
Wed, 9 Sep 2020 07:45:29 +0000 (09:45 +0200)
committerRichard Biener <rguenther@suse.de>
Wed, 9 Sep 2020 08:38:34 +0000 (10:38 +0200)
This avoids looking at STMT_VINFO_LIVE_P when vectorizing BBs.

2020-09-09  Richard Biener  <rguenther@suse.de>

PR tree-optimization/96978
* tree-vect-stmts.c (vectorizable_condition): Do not
look at STMT_VINFO_LIVE_P for BB vectorization.
(vectorizable_comparison): Likewise.

gcc/tree-vect-stmts.c

index a7ffe72378ffeea36e4ba4f44e8da863c421ca9e..065d1bf3cafacacc99099f8861a93504d325683f 100644 (file)
@@ -9855,7 +9855,7 @@ vectorizable_condition (vec_info *vinfo,
        return false;
 
       /* FORNOW: only supported as part of a reduction.  */
-      if (STMT_VINFO_LIVE_P (stmt_info))
+      if (loop_vinfo && STMT_VINFO_LIVE_P (stmt_info))
        {
          if (dump_enabled_p ())
            dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
@@ -10328,7 +10328,7 @@ vectorizable_comparison (vec_info *vinfo,
   if (STMT_VINFO_DEF_TYPE (stmt_info) != vect_internal_def)
     return false;
 
-  if (STMT_VINFO_LIVE_P (stmt_info))
+  if (loop_vinfo && STMT_VINFO_LIVE_P (stmt_info))
     {
       if (dump_enabled_p ())
        dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,