https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87895
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Tue Jan 8 09:54:36 2019 New Revision: 267684 URL: https://gcc.gnu.org/viewcvs?rev=267684&root=gcc&view=rev Log: Backported from mainline 2018-11-20 Jakub Jelinek <ja...@redhat.com> PR tree-optimization/87895 * omp-simd-clone.c (ipa_simd_modify_function_body): When removing or replacing GIMPLE_RETURN, set EDGE_FALLTHRU on the edge to EXIT. (simd_clone_adjust): Don't set EDGE_FALLTHRU here. In a loop that redirects edges to EXIT to edges to incr_bb, iterate while EXIT has any preds and always use EDGE_PRED (, 0). * gcc.dg/gomp/pr87895-1.c: New test. * gcc.dg/gomp/pr87895-2.c: New test. * gcc.dg/gomp/pr87895-3.c: New test. Added: branches/gcc-8-branch/gcc/testsuite/gcc.dg/gomp/pr87895-1.c branches/gcc-8-branch/gcc/testsuite/gcc.dg/gomp/pr87895-2.c branches/gcc-8-branch/gcc/testsuite/gcc.dg/gomp/pr87895-3.c Modified: branches/gcc-8-branch/gcc/ChangeLog branches/gcc-8-branch/gcc/omp-simd-clone.c branches/gcc-8-branch/gcc/testsuite/ChangeLog