From f03099371687f3f087e4949a68daccf76c8d18bc Mon Sep 17 00:00:00 2001 From: Andre Vieira Date: Tue, 12 Nov 2019 07:54:01 +0000 Subject: [PATCH] re PR tree-optimization/92347 (ICE in vect_get_vec_def_for_operand_1, at tree-vect-stmts.c:1537) 2019-11-11 Andre Vieira PR tree-optimization/92347 * tree-vect-loop.c (vect_transform_loop): Don't overwrite epilogues safelen with 0. * gcc.dg/vect/pr92347.c: New test. From-SVN: r278079 --- gcc/ChangeLog | 5 +++++ gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/gcc.dg/vect/pr92347.c | 18 ++++++++++++++++++ gcc/tree-vect-loop.c | 1 - 4 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gcc.dg/vect/pr92347.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4a38e5459b4..77ede4d0b2d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-11-12 Andre Vieira + + * tree-vect-loop.c (vect_transform_loop): Don't overwrite epilogues + safelen with 0. + 2019-11-12 Alan Modra * config/rs6000/predicates.md (unspec_tls): Allow const0_rtx for got diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 872495bbae7..1ef92af0061 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2019-11-12 Andre Vieira + + * gcc.dg/vect/pr92347.c: New test. + 2019-11-11 Jakub Jelinek PR c++/92447 diff --git a/gcc/testsuite/gcc.dg/vect/pr92347.c b/gcc/testsuite/gcc.dg/vect/pr92347.c new file mode 100644 index 00000000000..f75b2596a26 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/pr92347.c @@ -0,0 +1,18 @@ +/* Copied from PR 92347. */ +/* { dg-do compile } */ +/* { dg-options "-O1 -fopenmp-simd" } */ +/* { dg-additional-options "-mavx" { target { i?86-*-* x86_64-*-* } } } */ + +int by; + +#pragma omp declare simd +int +zp (int); + +void +qh (int oh) +{ +#pragma omp simd + for (by = 0; by < oh; ++by) + by = zp (by); +} diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index 78fe6290ee6..b600d315745 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -8587,7 +8587,6 @@ vect_transform_loop (loop_vec_info loop_vinfo) epilogue->simduid = loop->simduid; epilogue->force_vectorize = loop->force_vectorize; - epilogue->safelen = loop->safelen; epilogue->dont_vectorize = false; } -- 2.30.2