re PR tree-optimization/35821 (Internal compiler error: segmentation fault)

PR tree-optimization/35821
	* tree-vect-transform.c (vect_create_data_ref_ptr): Add check that
	NEW_STMT_LIST is not NULL.

From-SVN: r134162
This commit is contained in:
Ira Rosen 2008-04-10 05:51:59 +00:00 committed by Ira Rosen
parent ef14b9f86d
commit 19aec6b06c
5 changed files with 64 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2008-04-10 Ira Rosen <irar@il.ibm.com>
PR tree-optimization/35821
* tree-vect-transform.c (vect_create_data_ref_ptr): Add check that
NEW_STMT_LIST is not NULL.
2008-04-09 David Edelsohn <edelsohn@gnu.org>
PR libstdc++/35597

View File

@ -1,3 +1,9 @@
2008-04-10 Ira Rosen <irar@il.ibm.com>
PR tree-optimization/35821
* gcc.dg/vect/pr35821-altivec.c: New.
* gcc.dg/vect/pr35821-spu.c: New.
2008-04-09 Andy Hutchinson <hutchinsonandy@aim.com>
PR testsuite/34894

View File

@ -0,0 +1,24 @@
/* { dg-do compile { target { powerpc_altivec_ok } } } */
#include "altivec.h"
void
foo (float f_gain1, int n_tail, float * __restrict__ f_in_hptr,
float * __restrict__ f_out_hptr)
{
int i;
vector float *v_f_in_hptr, *v_f_out_hptr;
f_in_hptr = ( float* )v_f_in_hptr;
f_out_hptr = ( float* )v_f_out_hptr;
for( i = 0 ; i < n_tail ; i++ ) {
f_out_hptr[0] = f_in_hptr[0] * f_gain1;
f_in_hptr++;
f_out_hptr++;
}
}
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
/* { dg-final { cleanup-tree-dump "vect" } } */

View File

@ -0,0 +1,22 @@
/* { dg-do compile { target { spu-*-* } } } */
void
foo (float f_gain1, int n_tail, float * __restrict__ f_in_hptr,
float * __restrict__ f_out_hptr)
{
int i;
__attribute__((__spu_vector__)) float *v_f_in_hptr, *v_f_out_hptr;
f_in_hptr = ( float* )v_f_in_hptr;
f_out_hptr = ( float* )v_f_out_hptr;
for( i = 0 ; i < n_tail ; i++ ) {
f_out_hptr[0] = f_in_hptr[0] * f_gain1;
f_in_hptr++;
f_out_hptr++;
}
}
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
/* { dg-final { cleanup-tree-dump "vect" } } */

View File

@ -1102,8 +1102,12 @@ vect_create_data_ref_ptr (tree stmt, struct loop *at_loop,
new_temp = vect_create_addr_base_for_vector_ref (stmt, &new_stmt_list,
offset, loop);
pe = loop_preheader_edge (loop);
new_bb = bsi_insert_on_edge_immediate (pe, new_stmt_list);
gcc_assert (!new_bb);
if (new_stmt_list)
{
new_bb = bsi_insert_on_edge_immediate (pe, new_stmt_list);
gcc_assert (!new_bb);
}
*initial_address = new_temp;
/* Create: p = (vectype *) initial_base */