Commit d83cc5cc by Tom de Vries Committed by Tom de Vries

Handle equal-argument loop exit phi in expand_omp_for_static_chunk

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.

	* gfortran.dg/pr81464.f90: New test.

From-SVN: r250335
parent 8994b66f
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
......
......@@ -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));
......
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
......
! { 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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment