re PR middle-end/49603 (177.mesa in SPEC CPU 2000 failed to build)

2011-07-01  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/49603
	* tree-vect-stmts.c (vectorizable_load): Remove unnecessary
	assert.

	* gcc.dg/torture/pr49603.c: New testcase.

From-SVN: r175746
This commit is contained in:
Richard Guenther 2011-07-01 06:56:18 +00:00 committed by Richard Biener
parent 59198f271e
commit ab70d825c6
4 changed files with 37 additions and 12 deletions

View file

@ -1,3 +1,9 @@
2011-07-01 Richard Guenther <rguenther@suse.de>
PR tree-optimization/49603
* tree-vect-stmts.c (vectorizable_load): Remove unnecessary
assert.
2011-06-30 Martin Jambor <mjambor@suse.cz>
* tree-sra.c (struct access): Rename total_scalarization to

View file

@ -1,3 +1,8 @@
2011-07-01 Richard Guenther <rguenther@suse.de>
PR tree-optimization/49603
* gcc.dg/torture/pr49603.c: New testcase.
2011-06-30 Jason Merrill <jason@redhat.com>
PR c++/49387

View file

@ -0,0 +1,19 @@
/* { dg-do compile } */
struct gl_visual {
float AlphaScale;
};
struct gl_context {
struct gl_visual *Visual;
};
void quickdraw_rgb( struct gl_context * ctx,
int width, int height)
{
int i, j;
unsigned char alpha[1600];
for (j=0; j<width; j++)
alpha[j] = (int) ctx->Visual->AlphaScale;
for (i=0; i<height; i++)
foo( alpha);
}

View file

@ -4574,19 +4574,14 @@ vectorizable_load (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt,
/* 4. Handle invariant-load. */
if (inv_p && !bb_vinfo)
{
tree vec_inv;
gimple_stmt_iterator gsi2 = *gsi;
gcc_assert (!strided_load);
if (j == 0)
{
tree vec_inv;
gimple_stmt_iterator gsi2 = *gsi;
gsi_next (&gsi2);
vec_inv = build_vector_from_val (vectype, scalar_dest);
new_temp = vect_init_vector (stmt, vec_inv,
vectype, &gsi2);
new_stmt = SSA_NAME_DEF_STMT (new_temp);
}
else
gcc_unreachable (); /* FORNOW. */
gsi_next (&gsi2);
vec_inv = build_vector_from_val (vectype, scalar_dest);
new_temp = vect_init_vector (stmt, vec_inv,
vectype, &gsi2);
new_stmt = SSA_NAME_DEF_STMT (new_temp);
}
if (negative)