re PR tree-optimization/91181 (Failing as_as type conversion in vect_build_slp_tree_1)

2019-07-17  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/91181
	* tree-vect-slp.c (vect_build_slp_tree_1): Do not compare
	IFN_LOADs as calls.

	* gcc.dg/pr91181.c: New testcase.

From-SVN: r273542
This commit is contained in:
Richard Biener 2019-07-17 07:07:21 +00:00 committed by Richard Biener
parent 361c0470f5
commit d6350f8231
4 changed files with 33 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2019-07-17 Richard Biener <rguenther@suse.de>
PR tree-optimization/91181
* tree-vect-slp.c (vect_build_slp_tree_1): Do not compare
IFN_LOADs as calls.
2019-07-16 Uroš Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (*testdi_1): Match CCZmode for

View file

@ -1,3 +1,8 @@
2019-07-17 Richard Biener <rguenther@suse.de>
PR tree-optimization/91181
* gcc.dg/pr91181.c: New testcase.
2019-07-16 Harald Anlauf <anlauf@gmx.de>
PR fortran/90903

View file

@ -0,0 +1,21 @@
/* { dg-do compile } */
/* { dg-options "-Ofast" } */
/* { dg-additional-options "-mavx" { target x86_64-*-* i?86-*-* } } */
enum { a, b, c };
float *d, *e;
int f, g, h, i;
int j()
{
float a;
for (; h; h++)
{
i = h * 4;
a = d[i + b];
if (a) {
e[i + b] = g < d[i + b] * f * a ? g : d[i + b] * f * a;
e[i + c] = g < d[i + c] * f * a ? g : d[i + c] * f * a;
}
e[i + b] = e[i + c];
}
}

View file

@ -857,7 +857,7 @@ vect_build_slp_tree_1 (unsigned char *swap,
continue;
}
if (rhs_code == CALL_EXPR)
if (!load_p && rhs_code == CALL_EXPR)
{
if (!compatible_calls_p (as_a <gcall *> (stmts[0]->stmt),
as_a <gcall *> (stmt)))