From: Jakub Jelinek Date: Mon, 19 Feb 2018 18:58:13 +0000 (+0100) Subject: re PR tree-optimization/84452 (ICE in expand_simd_clones at gcc/omp-simd-clone.c... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=73829f90459f40d7362fc3ac2d883ac98f1670a9;p=gcc.git re PR tree-optimization/84452 (ICE in expand_simd_clones at gcc/omp-simd-clone.c:1612) PR tree-optimization/84452 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen is NULL. * gcc.dg/pr84452.c: New test. From-SVN: r257819 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 209ea145b17..13ce8f2001c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2018-02-19 Jakub Jelinek + + PR tree-optimization/84452 + * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call + expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen + is NULL. + 2018-02-19 Martin Liska PR sanitizer/82183 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b84c10f0b1b..5975b23bb88 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,8 @@ 2018-02-19 Jakub Jelinek + PR tree-optimization/84452 + * gcc.dg/pr84452.c: New test. + PR c++/79064 * g++.dg/template/overload15.C (f): Use 0u - 1ll instead of 0u - 1l. diff --git a/gcc/testsuite/gcc.dg/pr84452.c b/gcc/testsuite/gcc.dg/pr84452.c new file mode 100644 index 00000000000..6e961cb04e8 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr84452.c @@ -0,0 +1,14 @@ +/* PR tree-optimization/84452 */ +/* { dg-do compile } */ +/* { dg-options "-Ofast" } */ + +double pow (double, double) __attribute__((simd)); +double exp (double) __attribute__((simd)); +extern double a[1024], b[1024]; + +void +foo (void) +{ + for (int i = 0; i < 1024; ++i) + a[i] = pow (2.0, b[i]); +} diff --git a/gcc/tree-vect-patterns.c b/gcc/tree-vect-patterns.c index 25a2efb21f8..34f69e9843d 100644 --- a/gcc/tree-vect-patterns.c +++ b/gcc/tree-vect-patterns.c @@ -1113,7 +1113,8 @@ vect_recog_pow_pattern (vec *stmts, tree *type_in, cgraph_node *node = cgraph_node::get_create (exp_decl); if (node->simd_clones == NULL) { - if (node->definition) + if (targetm.simd_clone.compute_vecsize_and_simdlen == NULL + || node->definition) return NULL; expand_simd_clones (node); if (node->simd_clones == NULL)