re PR tree-optimization/68502 ([i686] spec2000/179.art runfails after r222914)

2015-11-25  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/68502
	* tree-vect-data-refs.c (vect_analyze_group_access_1): Restore
	check that the step is a multiple of the type size.

	* gcc.dg/vect/pr68502-1.c: New testcase.
	* gcc.dg/vect/pr68502-2.c: Likewise.

From-SVN: r230854
This commit is contained in:
Richard Biener 2015-11-25 08:46:34 +00:00 committed by Richard Biener
parent b1b49824a8
commit 993a6bd98b
5 changed files with 129 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2015-11-25 Richard Biener <rguenther@suse.de>
PR tree-optimization/68502
* tree-vect-data-refs.c (vect_analyze_group_access_1): Restore
check that the step is a multiple of the type size.
2015-11-24 Michael Collison <michael.collison@linaro.org>
* config/aarch64/aarch64-simd.md (widen_ssum, widen_usum)

View File

@ -1,3 +1,9 @@
2015-11-25 Richard Biener <rguenther@suse.de>
PR tree-optimization/68502
* gcc.dg/vect/pr68502-1.c: New testcase.
* gcc.dg/vect/pr68502-2.c: Likewise.
2015-11-24 Michael Collison <michael.collison@linaro.org>
* gcc.target/aarch64/saddw-1.c: New test.

View File

@ -0,0 +1,48 @@
#include <stdlib.h>
#include "tree-vect.h"
typedef struct {
double *I;
double W;
double X;
double V;
double U;
double P;
double Q;
double R;
} f1_neuron;
f1_neuron *f1_layer;
int numf1s = 1000;
void __attribute__((noinline,noclone))
reset_nodes()
{
int i;
for (i=0;i<numf1s;i++)
{
f1_layer[i].W = 0.0;
f1_layer[i].X = 0.0;
f1_layer[i].V = 0.0;
f1_layer[i].U = 0.0;
f1_layer[i].P = 0.0;
f1_layer[i].Q = 0.0;
f1_layer[i].R = 0.0;
}
}
int main ()
{
int i;
check_vect ();
f1_layer = (f1_neuron *)malloc (numf1s * sizeof (f1_neuron));
for (i = 0; i < numf1s; i++)
f1_layer[i].I = (double *)-1;
reset_nodes ();
for (i = 0; i < numf1s; i++)
if (f1_layer[i].I != (double *)-1)
abort ();
return 0;
}

View File

@ -0,0 +1,48 @@
#include <stdlib.h>
#include "tree-vect.h"
typedef struct {
short I;
int W;
int X;
int V;
int U;
int P;
int Q;
int R;
} __attribute__((packed)) f1_neuron;
f1_neuron *f1_layer;
int numf1s = 1000;
void __attribute__((noinline,noclone))
reset_nodes()
{
int i;
for (i=0;i<numf1s;i++)
{
f1_layer[i].W = 0;
f1_layer[i].X = 0;
f1_layer[i].V = 0;
f1_layer[i].U = 0;
f1_layer[i].P = 0;
f1_layer[i].Q = 0;
f1_layer[i].R = 0;
}
}
int main ()
{
int i;
check_vect ();
f1_layer = (f1_neuron *)malloc (numf1s * sizeof (f1_neuron));
for (i = 0; i < numf1s; i++)
f1_layer[i].I = -1;
reset_nodes ();
for (i = 0; i < numf1s; i++)
if (f1_layer[i].I != -1)
abort ();
return 0;
}

View File

@ -2176,6 +2176,27 @@ vect_analyze_group_access_1 (struct data_reference *dr)
if (tree_fits_shwi_p (step))
{
dr_step = tree_to_shwi (step);
/* Check that STEP is a multiple of type size. Otherwise there is
a non-element-sized gap at the end of the group which we
cannot represent in GROUP_GAP or GROUP_SIZE.
??? As we can handle non-constant step fine here we should
simply remove uses of GROUP_GAP between the last and first
element and instead rely on DR_STEP. GROUP_SIZE then would
simply not include that gap. */
if ((dr_step % type_size) != 0)
{
if (dump_enabled_p ())
{
dump_printf_loc (MSG_NOTE, vect_location,
"Step ");
dump_generic_expr (MSG_NOTE, TDF_SLIM, step);
dump_printf (MSG_NOTE,
" is not a multiple of the element size for ");
dump_generic_expr (MSG_NOTE, TDF_SLIM, DR_REF (dr));
dump_printf (MSG_NOTE, "\n");
}
return false;
}
groupsize = absu_hwi (dr_step) / type_size;
}
else