re PR tree-optimization/87931 (ICE in vectorizable_reduction, at tree-vect-loop.c:6193 since r265876)
2018-11-13 Richard Biener <rguenther@suse.de> PR tree-optimization/87931 * tree-vect-loop.c (vect_is_simple_reduction): Restrict nested cycles we support to latch computations vectorizable_reduction handles. * gcc.dg/graphite/pr87931.c: New testcase. From-SVN: r266075
This commit is contained in:
parent
160576e1ac
commit
41b32876b8
@ -1,3 +1,10 @@
|
||||
2018-11-13 Richard Biener <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/87931
|
||||
* tree-vect-loop.c (vect_is_simple_reduction): Restrict
|
||||
nested cycles we support to latch computations vectorizable_reduction
|
||||
handles.
|
||||
|
||||
2018-11-13 Martin Liska <mliska@suse.cz>
|
||||
|
||||
PR tree-optimization/87885
|
||||
|
||||
@ -1,3 +1,8 @@
|
||||
2018-11-13 Richard Biener <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/87931
|
||||
* gcc.dg/graphite/pr87931.c: New testcase.
|
||||
|
||||
2018-11-13 Martin Liska <mliska@suse.cz>
|
||||
|
||||
PR sanitizer/87930
|
||||
|
||||
22
gcc/testsuite/gcc.dg/graphite/pr87931.c
Normal file
22
gcc/testsuite/gcc.dg/graphite/pr87931.c
Normal file
@ -0,0 +1,22 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O3 -fno-tree-copy-prop -fgraphite-identity" } */
|
||||
|
||||
#define N 40
|
||||
#define M 128
|
||||
float in[N+M];
|
||||
float coeff[M];
|
||||
float fir_out[N];
|
||||
|
||||
void fir ()
|
||||
{
|
||||
int i,j,k;
|
||||
float diff;
|
||||
|
||||
for (i = 0; i < N; i++) {
|
||||
diff = 0;
|
||||
for (j = 0; j < M; j++) {
|
||||
diff += in[j+i]*coeff[j];
|
||||
}
|
||||
fir_out[i] = diff;
|
||||
}
|
||||
}
|
||||
@ -2976,6 +2976,22 @@ vect_is_simple_reduction (loop_vec_info loop_info, stmt_vec_info phi_info,
|
||||
|
||||
if (nested_in_vect_loop && !check_reduction)
|
||||
{
|
||||
/* FIXME: Even for non-reductions code generation is funneled
|
||||
through vectorizable_reduction for the stmt defining the
|
||||
PHI latch value. So we have to artificially restrict ourselves
|
||||
for the supported operations. */
|
||||
switch (get_gimple_rhs_class (code))
|
||||
{
|
||||
case GIMPLE_BINARY_RHS:
|
||||
case GIMPLE_TERNARY_RHS:
|
||||
break;
|
||||
default:
|
||||
/* Not supported by vectorizable_reduction. */
|
||||
if (dump_enabled_p ())
|
||||
report_vect_op (MSG_MISSED_OPTIMIZATION, def_stmt,
|
||||
"nested cycle: not handled operation: ");
|
||||
return NULL;
|
||||
}
|
||||
if (dump_enabled_p ())
|
||||
report_vect_op (MSG_NOTE, def_stmt, "detected nested cycle: ");
|
||||
return def_stmt_info;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user