[PATCH, PR58805] Add missing check in stmt_local_def for tail-merge

Richard Biener rguenther@suse.de
Wed Oct 23 09:06:00 GMT 2013


On Tue, 22 Oct 2013, Jeff Law wrote:

> On 10/22/13 03:58, Tom de Vries wrote:
> > Richard,
> > 
> > This patch adds a missing check for gimple_vdef in stmt_local_def for the
> > tail-merge pass.
> > 
> > Bootstrapped and reg-tested on x86_64.
> > 
> > OK for trunk, gcc-4_8-branch?
> > 
> > Thanks,
> > - Tom
> > 
> > 2013-10-22  Tom de Vries  <tom@codesourcery.com>
> > 
> > 	PR tree-optimization/58805
> > 	* tree-ssa-tail-merge.c (stmt_local_def): Add gimple_vdef check.
> > 
> > 	* gcc.dg/pr58805.c: New test.
> Doesn't this test belong in an architecture specific directory?
> 
> Under what conditions can a statement have a VDEF but not be considered as
> having a side effect by gimple_has_side_effects?
> 
> It almost seems to me that gimple_has_side_effects may need updating.

You seem to misunderstand "side-effect", for example

 *p = 1;

has !gimple_has_side_effects but it has a VDEF.  Likewise

 *p = const_call_returing_aggregate ();

has !gimple_has_side_effects but it has a VDEF.  side-effect is
an effect that is not explicitely represented in the gimple stmt
you look at.

Richard.



More information about the Gcc-patches mailing list