From: rguenth Date: Mon, 14 Oct 2019 11:47:15 +0000 (+0000) Subject: 2019-10-14 Richard Biener X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3ddb10c1de30e4d5e03ea3f0727b888289777f7a;p=thirdparty%2Fgcc.git 2019-10-14 Richard Biener PR tree-optimization/92069 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): For nested cycles do not set vect_nested_cycle on the latch definition. * gcc.dg/torture/pr92069.c: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@276959 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e755803b12c1..c2cbd4274ca1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-10-14 Richard Biener + + PR tree-optimization/92069 + * tree-vect-loop.c (vect_analyze_scalar_cycles_1): For nested + cycles do not set vect_nested_cycle on the latch definition. + 2019-10-14 Richard Sandiford * function-abi.h (expr_callee_abi): Declare. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 13988f87736f..281da7ff85e2 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-10-14 Richard Biener + + PR tree-optimization/92069 + * gcc.dg/torture/pr92069.c: New testcase. + 2019-10-14 Paolo Carlini * g++.dg/cpp0x/constexpr-union5.C: Test location(s) too. diff --git a/gcc/testsuite/gcc.dg/torture/pr92069.c b/gcc/testsuite/gcc.dg/torture/pr92069.c new file mode 100644 index 000000000000..806ff5fba144 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr92069.c @@ -0,0 +1,19 @@ +/* { dg-do compile } */ +/* { dg-additional-options "-ftree-vectorize" } */ + +unsigned int a, c, d; +double b; +void e() +{ + for (; d; d++) + { + double f; + a = 2; + for (; a; a++) + { + c = b; + b = f; + f = c; + } + } +} diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index cb95ea362988..de018acefad3 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -584,7 +584,6 @@ vect_analyze_scalar_cycles_1 (loop_vec_info loop_vinfo, class loop *loop) "Detected vectorizable nested cycle.\n"); STMT_VINFO_DEF_TYPE (stmt_vinfo) = vect_nested_cycle; - STMT_VINFO_DEF_TYPE (reduc_stmt_info) = vect_nested_cycle; } else {