From: Richard Biener Date: Wed, 17 Jul 2019 07:07:21 +0000 (+0000) Subject: re PR tree-optimization/91181 (Failing as_as type conversion in vect_build_slp_tree_1) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d6350f82315a6d811c6dd0910ea37f64524ef07b;p=gcc.git re PR tree-optimization/91181 (Failing as_as type conversion in vect_build_slp_tree_1) 2019-07-17 Richard Biener 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 851f04a8659..36ebe6edfaa 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-07-17 Richard Biener + + 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 * config/i386/i386.md (*testdi_1): Match CCZmode for diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 689299b53b7..9cf270f098f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-07-17 Richard Biener + + PR tree-optimization/91181 + * gcc.dg/pr91181.c: New testcase. + 2019-07-16 Harald Anlauf PR fortran/90903 diff --git a/gcc/testsuite/gcc.dg/pr91181.c b/gcc/testsuite/gcc.dg/pr91181.c new file mode 100644 index 00000000000..63e33626a9b --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr91181.c @@ -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]; + } +} diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c index 31f4519ff5a..0220b1804fb 100644 --- a/gcc/tree-vect-slp.c +++ b/gcc/tree-vect-slp.c @@ -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 (stmts[0]->stmt), as_a (stmt)))