diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/omp-expand.c | 4 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/pr81464.f90 | 19 |
4 files changed, 34 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ef0e788..54e78a6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2017-07-18 Tom de Vries <tom@codesourcery.com> + + PR middle-end/81464 + * omp-expand.c (expand_omp_for_static_chunk): Handle equal-argument loop + exit phi. + 2017-07-18 Uros Bizjak <ubizjak@gmail.com> PR target/81471 diff --git a/gcc/omp-expand.c b/gcc/omp-expand.c index 929c530..d6755cd 100644 --- a/gcc/omp-expand.c +++ b/gcc/omp-expand.c @@ -4206,6 +4206,10 @@ expand_omp_for_static_chunk (struct omp_region *region, source_location locus; phi = psi.phi (); + if (operand_equal_p (gimple_phi_arg_def (phi, 0), + redirect_edge_var_map_def (vm), 0)) + continue; + t = gimple_phi_result (phi); gcc_assert (t == redirect_edge_var_map_result (vm)); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 1929d15..4687e45 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-07-18 Tom de Vries <tom@codesourcery.com> + + PR middle-end/81464 + * gfortran.dg/pr81464.f90: New test. + 2017-07-18 Uros Bizjak <ubizjak@gmail.com> PR target/81471 diff --git a/gcc/testsuite/gfortran.dg/pr81464.f90 b/gcc/testsuite/gfortran.dg/pr81464.f90 new file mode 100644 index 0000000..425cae9 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/pr81464.f90 @@ -0,0 +1,19 @@ +! { dg-do compile } +! { dg-options "--param parloops-chunk-size=2 -ftree-parallelize-loops=2 -O1" } + +program main + implicit none + real, dimension(:,:),allocatable :: a, b, c + real :: sm + + allocate (a(2,2), b(2,2), c(2,2)) + + call random_number(a) + call random_number(b) + + c = matmul(a,b) + sm = sum(c) + + deallocate(a,b,c) + +end program main |