Commit 96bb56b2 by Richard Biener Committed by Richard Biener

re PR tree-optimization/64404 (ICE: in vect_get_vec_def_for_operand, at…

re PR tree-optimization/64404 (ICE: in vect_get_vec_def_for_operand, at tree-vect-stmts.c:1464 with --param=sccvn-max-alias-queries-per-access=1)

2015-01-13  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/64404
	* tree-vect-stmts.c (vectorizable_load): Reject conflicting
	SLP types for CSEd loads.

	* gcc.dg/vect/pr64404.c: New testcase.

From-SVN: r219527
parent ebcd09c1
2015-01-13 Richard Biener <rguenther@suse.de>
PR tree-optimization/64404
* tree-vect-stmts.c (vectorizable_load): Reject conflicting
SLP types for CSEd loads.
2015-01-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
PR tree-optimization/64436
......
2015-01-13 Richard Biener <rguenther@suse.de>
PR tree-optimization/64404
* gcc.dg/vect/pr64404.c: New testcase.
2014-01-13 Richard Biener <rguenther@suse.de>
PR tree-optimization/64568
......
/* { dg-do run } */
/* { dg-additional-options "--param=sccvn-max-alias-queries-per-access=1" } */
#include "tree-vect.h"
extern void abort (void);
typedef struct
{
int l, h;
} tFPinterval;
tFPinterval X[1024];
tFPinterval Y[1024];
tFPinterval Z[1024];
void __attribute__((noinline))
Compute (void)
{
int d;
for (d = 0; d < 1024; d++)
{
Y[d].l = X[d].l + X[d].h;
Y[d].h = Y[d].l;
Z[d].l = X[d].l;
Z[d].h = X[d].h;
}
}
int
main (void)
{
int d;
check_vect ();
for (d = 0; d < 1024; d++)
{
X[d].l = d;
X[d].h = d + 1;
__asm__ volatile ("");
}
Compute ();
for (d = 0; d < 1024; d++)
{
if (Y[d].l != X[d].l + X[d].h
|| Y[d].h != Y[d].l
|| Z[d].l != X[d].l
|| Z[d].h != X[d].h)
abort ();
__asm__ volatile ("");
}
return 0;
}
/* { dg-final { cleanup-tree-dump "vect" } } */
......@@ -5791,6 +5791,20 @@ vectorizable_load (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt,
"group loads with negative dependence distance\n");
return false;
}
/* Similarly when the stmt is a load that is both part of a SLP
instance and a loop vectorized stmt via the same-dr mechanism
we have to give up. */
if (STMT_VINFO_GROUP_SAME_DR_STMT (stmt_info)
&& (STMT_SLP_TYPE (stmt_info)
!= STMT_SLP_TYPE (vinfo_for_stmt
(STMT_VINFO_GROUP_SAME_DR_STMT (stmt_info)))))
{
if (dump_enabled_p ())
dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
"conflicting SLP types for CSEd load\n");
return false;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment