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  <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.
This commit is contained in:
Richard Biener 2020-09-09 09:45:29 +02:00
parent e470d8af81
commit fb51be60c8

View File

@ -9855,7 +9855,7 @@ vectorizable_condition (vec_info *vinfo,
return false; return false;
/* FORNOW: only supported as part of a reduction. */ /* 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 ()) if (dump_enabled_p ())
dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, 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) if (STMT_VINFO_DEF_TYPE (stmt_info) != vect_internal_def)
return false; return false;
if (STMT_VINFO_LIVE_P (stmt_info)) if (loop_vinfo && STMT_VINFO_LIVE_P (stmt_info))
{ {
if (dump_enabled_p ()) if (dump_enabled_p ())
dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,