re PR tree-optimization/89049 (Unexpected vectorization)
authorRichard Biener <rguenther@suse.de>
Fri, 25 Jan 2019 12:46:24 +0000 (12:46 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 25 Jan 2019 12:46:24 +0000 (12:46 +0000)
2019-01-25  Richard Biener  <rguenther@suse.de>

PR tree-optimization/89049
* tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
Look at the pattern stmt to determine if the stmt is vectorized.

From-SVN: r268264

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

index 0b91451e5e09c7d35852f3f40a03e18ae935ca15..cc4f4413f1427b8ad406909a5489e4e08d179d41 100644 (file)
@@ -1,3 +1,9 @@
+2019-01-25  Richard Biener  <rguenther@suse.de>
+
+       PR tree-optimization/89049
+       * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
+       Look at the pattern stmt to determine if the stmt is vectorized.
+
 2019-01-25  Richard Sandiford  <richard.sandiford@arm.com>
 
        * config/aarch64/aarch64-sve.md (*pred_mov<mode>)
index 202cab940d4719c018d830199cbe0559fb5a0277..eda4c24846ad05b412f805230d598799ab19184c 100644 (file)
@@ -1100,11 +1100,11 @@ vect_compute_single_scalar_iteration_cost (loop_vec_info loop_vinfo)
             continue;
 
           /* Skip stmts that are not vectorized inside the loop.  */
-          if (stmt_info
-              && !STMT_VINFO_RELEVANT_P (stmt_info)
-              && (!STMT_VINFO_LIVE_P (stmt_info)
-                  || !VECTORIZABLE_CYCLE_DEF (STMT_VINFO_DEF_TYPE (stmt_info)))
-             && !STMT_VINFO_IN_PATTERN_P (stmt_info))
+         stmt_vec_info vstmt_info = vect_stmt_to_vectorize (stmt_info);
+          if (!STMT_VINFO_RELEVANT_P (vstmt_info)
+              && (!STMT_VINFO_LIVE_P (vstmt_info)
+                  || !VECTORIZABLE_CYCLE_DEF
+                       (STMT_VINFO_DEF_TYPE (vstmt_info))))
             continue;
 
          vect_cost_for_stmt kind;