This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, PR81464] Handle equal-argument loop exit phi in expand_omp_for_static_chunk


On 07/18/2017 06:59 PM, Jakub Jelinek wrote:
On Tue, Jul 18, 2017 at 06:48:56PM +0200, Tom de Vries wrote:
Hi,

this patch fixes PR81464, an ICE in ompexpssa.

The ICE occurs in expand_omp_for_static_chunk when we're trying to fix up a
loop exit phi:
...
   # .MEM_88 = PHI <.MEM_86(46), .MEM_86(71)>
...

That is something that should be cleaned up by some phi opt, but if it has
been introduced during the parloops pass or too early before that, we
probably should deal with it.


I checked, it's introduced during the parloops pass.

--- 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;

Wrong formatting, please remove 2 spaces before continue;

Otherwise LGTM.


Updated and committed.

Thanks,
- Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]