This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix vectorizer thinko


This fixes an ICE I am seeing with local changes - the definition
stmt of an SSA name is never "NULL", but it is a GIMPLE_NOP if
it does not have a definition.  Those are the stmts that are not
associated with any basic-block.

Bootstrapped and tested on x86_64-unknown-linux-gnu, applied.

Richard.

2013-09-05  Richard Biener  <rguenther@suse.de>

	* tree-vect-loop.c (vect_analyze_loop_operations): Properly
	check for a definition without a basic-block.

Index: gcc/tree-vect-loop.c
===================================================================
*** gcc/tree-vect-loop.c	(revision 202240)
--- gcc/tree-vect-loop.c	(working copy)
*************** vect_analyze_loop_operations (loop_vec_i
*** 1384,1390 ****
                      return false;
  
                    op_def_stmt = SSA_NAME_DEF_STMT (phi_op);
! 		  if (!op_def_stmt
  		      || !flow_bb_inside_loop_p (loop, gimple_bb (op_def_stmt))
  		      || !vinfo_for_stmt (op_def_stmt))
                      return false;
--- 1384,1390 ----
                      return false;
  
                    op_def_stmt = SSA_NAME_DEF_STMT (phi_op);
! 		  if (gimple_nop_p (op_def_stmt)
  		      || !flow_bb_inside_loop_p (loop, gimple_bb (op_def_stmt))
  		      || !vinfo_for_stmt (op_def_stmt))
                      return false;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]