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][tuples] Fix vect/vect-iv-9.c


This failure occured because reassoc was messing up the reduction
pattern.  This is because we do different operator ranks for
GIMPLE_SINGLE_RHS now.  Fixed with the following patch.

I'll apply this after bootstrapping and testing.

Richard.

2008-07-18  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-reassoc.c (get_rank): For single rhs process its
	operands.

Index: gcc/tree-ssa-reassoc.c
===================================================================
*** gcc/tree-ssa-reassoc.c	(revision 137939)
--- gcc/tree-ssa-reassoc.c	(working copy)
*************** get_rank (tree e)
*** 255,265 ****
  	 rank, whichever is less.   */
        rank = 0;
        maxrank = bb_rank[gimple_bb(stmt)->index];
!       n = gimple_num_ops (stmt);
!       for (i = 1; i < n && rank != maxrank; i++)
  	{
! 	  gcc_assert (gimple_op (stmt, i));
! 	  rank = MAX(rank, get_rank (gimple_op (stmt, i)));
  	}
  
        if (dump_file && (dump_flags & TDF_DETAILS))
--- 255,281 ----
  	 rank, whichever is less.   */
        rank = 0;
        maxrank = bb_rank[gimple_bb(stmt)->index];
!       if (gimple_assign_single_p (stmt))
  	{
! 	  tree rhs = gimple_assign_rhs1 (stmt);
! 	  n = TREE_OPERAND_LENGTH (rhs);
! 	  if (n == 0)
! 	    rank = MAX (rank, get_rank (rhs));
! 	  else
! 	    {
! 	      for (i = 0;
! 		   i < n && TREE_OPERAND (rhs, i) && rank != maxrank; i++)
! 		rank = MAX(rank, get_rank (TREE_OPERAND (rhs, i)));
! 	    }
! 	}
!       else
! 	{
! 	  n = gimple_num_ops (stmt);
! 	  for (i = 1; i < n && rank != maxrank; i++)
! 	    {
! 	      gcc_assert (gimple_op (stmt, i));
! 	      rank = MAX(rank, get_rank (gimple_op (stmt, i)));
! 	    }
  	}
  
        if (dump_file && (dump_flags & TDF_DETAILS))


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