From: Richard Biener Date: Wed, 28 Nov 2018 08:29:16 +0000 (+0000) Subject: re PR tree-optimization/88182 (ICE in vectorizable_reduction, at tree-vect-loop.c... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fc60283c5c7987a120cdadd24024a0319bfe0360;p=gcc.git re PR tree-optimization/88182 (ICE in vectorizable_reduction, at tree-vect-loop.c:6465) 2018-10-19 Richard Biener PR tree-optimization/88182 * g++.dg/gomp/pr88182.C: Move from libgomp and use -fopenmp-simd. * testsuite/libgomp.c++/pr88182.C: Move to g++.dg/gomp. From-SVN: r266545 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ce80f72266d..920885b6aa7 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2018-10-19 Richard Biener + + PR tree-optimization/88182 + * g++.dg/gomp/pr88182.C: Move from libgomp and use -fopenmp-simd. + 2018-11-27 Jakub Jelinek PR c++/88187 diff --git a/gcc/testsuite/g++.dg/gomp/pr88182.C b/gcc/testsuite/g++.dg/gomp/pr88182.C new file mode 100644 index 00000000000..6eeeed9fff7 --- /dev/null +++ b/gcc/testsuite/g++.dg/gomp/pr88182.C @@ -0,0 +1,42 @@ +// { dg-do run } +// { dg-options "-O -fopenmp-simd -ftree-loop-if-convert -fno-ssa-phiopt" } + +#pragma omp declare simd simdlen(4) notinbranch +__attribute__((noinline)) int +foo (double c1, double c2) +{ + double z1 = c1, z2 = c2; + int res = 100, i; + + for (i = 0; i < 5; i++) + { + res = (z1 * z1 + z2 * z2 > 4.0) ? (i < res ? i : res) : res; + z1 = c1 + z1 * z1 - z2 * z2; + z2 = c2 + 2.0 * z1 * z2; + c1 += 0.5; + c2 += 0.5; + } + return res; +} + +__attribute__((noinline, noclone)) void +bar (double *x, double *y) +{ + asm volatile ("" : : "rm" (x), "rm" (y) : "memory"); +} + +int +main () +{ + int i; + double c[4] = { 0.0, 1.0, 0.0, 1.0 }; + double d[4] = { 0.0, 1.0, 2.0, 0.0 }; + int e[4]; + bar (c, d); +#pragma omp simd safelen(4) + for (i = 0; i < 4; i++) + e[i] = foo (c[i], d[i]); + if (e[0] != 3 || e[1] != 1 || e[2] != 1 || e[3] != 2) + __builtin_abort (); + return 0; +} diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index 41a78e6a5bc..d3c1bc36c14 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,8 @@ +2018-10-19 Richard Biener + + PR tree-optimization/88182 + * testsuite/libgomp.c++/pr88182.C: Move to g++.dg/gomp. + 2018-11-26 Jakub Jelinek * testsuite/Makefile.am (AUTOMAKE_OPTIONS): Drop dejagnu. diff --git a/libgomp/testsuite/libgomp.c++/pr88182.C b/libgomp/testsuite/libgomp.c++/pr88182.C deleted file mode 100644 index 2e3ac69c5fc..00000000000 --- a/libgomp/testsuite/libgomp.c++/pr88182.C +++ /dev/null @@ -1,42 +0,0 @@ -// { dg-do run } -// { dg-options "-O -fopenmp -ftree-loop-if-convert -fno-ssa-phiopt" } - -#pragma omp declare simd simdlen(4) notinbranch -__attribute__((noinline)) int -foo (double c1, double c2) -{ - double z1 = c1, z2 = c2; - int res = 100, i; - - for (i = 0; i < 5; i++) - { - res = (z1 * z1 + z2 * z2 > 4.0) ? (i < res ? i : res) : res; - z1 = c1 + z1 * z1 - z2 * z2; - z2 = c2 + 2.0 * z1 * z2; - c1 += 0.5; - c2 += 0.5; - } - return res; -} - -__attribute__((noinline, noclone)) void -bar (double *x, double *y) -{ - asm volatile ("" : : "rm" (x), "rm" (y) : "memory"); -} - -int -main () -{ - int i; - double c[4] = { 0.0, 1.0, 0.0, 1.0 }; - double d[4] = { 0.0, 1.0, 2.0, 0.0 }; - int e[4]; - bar (c, d); -#pragma omp simd safelen(4) - for (i = 0; i < 4; i++) - e[i] = foo (c[i], d[i]); - if (e[0] != 3 || e[1] != 1 || e[2] != 1 || e[3] != 2) - __builtin_abort (); - return 0; -}