[Bug tree-optimization/33373] ICE in vectorizable_type_demotion, at tree-vect-transform.c:4098

2007-09-10 Thread dorit at gcc dot gnu dot org


--- Comment #2 from dorit at gcc dot gnu dot org  2007-09-10 09:08 ---
Testing this patch (it's a bug in the fix for PR33301. I accidentally treated
TYPE_SIZE_UNIT as a constant, whereas it's really a tree...):

Index: tree-vect-analyze.c
===
*** tree-vect-analyze.c (revision 128322)
--- tree-vect-analyze.c (working copy)
*** vect_determine_vectorization_factor (loo
*** 242,252 
  operation = GIMPLE_STMT_OPERAND (stmt, 1);
  if (TREE_CODE (operation) == NOP_EXPR
  || TREE_CODE (operation) == CONVERT_EXPR
! || TREE_CODE (operation) ==  WIDEN_MULT_EXPR)
{
  tree rhs_type = TREE_TYPE (TREE_OPERAND (operation, 0));
! if (TYPE_SIZE_UNIT (rhs_type) < TYPE_SIZE_UNIT (scalar_type))
!   scalar_type = TREE_TYPE (TREE_OPERAND (operation, 0));
}

  if (vect_print_dump_info (REPORT_DETAILS))
--- 242,253 
  operation = GIMPLE_STMT_OPERAND (stmt, 1);
  if (TREE_CODE (operation) == NOP_EXPR
  || TREE_CODE (operation) == CONVERT_EXPR
! || TREE_CODE (operation) == WIDEN_MULT_EXPR)
{
  tree rhs_type = TREE_TYPE (TREE_OPERAND (operation, 0));
! if (TREE_INT_CST_LOW (TYPE_SIZE_UNIT (rhs_type)) <
! TREE_INT_CST_LOW (TYPE_SIZE_UNIT (scalar_type)))
!   scalar_type = rhs_type;
}

  if (vect_print_dump_info (REPORT_DETAILS))


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33373



[Bug tree-optimization/33373] ICE in vectorizable_type_demotion, at tree-vect-transform.c:4098

2007-09-12 Thread dorit at gcc dot gnu dot org


--- Comment #3 from dorit at gcc dot gnu dot org  2007-09-12 07:10 ---
Subject: Bug 33373

Author: dorit
Date: Wed Sep 12 07:09:38 2007
New Revision: 128415

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=128415
Log:
PR tree-optimization/33373
* tree-vect-analyze (vect_determine_vectorization_factor): Call
TREE_INT_CST_LOW when comparing TYPE_SIZE_UNIT.


Added:
trunk/gcc/testsuite/gcc.dg/vect/pr33373.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-vect-analyze.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33373