From fb51be60c8e7b6978f817f44d5df4759f2faf425 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Wed, 9 Sep 2020 09:45:29 +0200 Subject: [PATCH] tree-optimization/96978 - fix fallout of BB vectorization of live stmts This avoids looking at STMT_VINFO_LIVE_P when vectorizing BBs. 2020-09-09 Richard Biener 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c index a7ffe72378f..065d1bf3caf 100644 --- a/gcc/tree-vect-stmts.c +++ b/gcc/tree-vect-stmts.c @@ -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, -- 2.30.2