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] Fix PR32586, restore combining of conversions in SCCVN


On Thu, 6 Sep 2007, Daniel Berlin wrote:

> On 9/6/07, Richard Guenther <rguenther@suse.de> wrote:
> > On Thu, 6 Sep 2007, Daniel Berlin wrote:
> >
> > > On 9/6/07, Richard Guenther <rguenther@suse.de> wrote:
> > > >
> > > > This fixes PR32586 (as I promised to do) and re-instantiates
> > > > tree-combining of conversions in FRE/SCCVN.  This allows to remove
> > > > a bunch of XFAILs Danny added at SCCVN merge time.  This also fixes
> > > > the builtins-51.c failure on trunk.
> > > >
> > > > Bootstrapped and tested on x86_64-unknown-linux-gnu.  Danny, are
> > > > the SCCVN changes ok?  (Is there a better way than value_expr_p?
> > > > What I would need is a predicate that tells whether I can substitute
> > > > VN_INFO -> expr for the value number in expressions)
> > >
> > > has_constants can normally tell you whether you can substitute the
> > > ->expr in, but that was predicated on the idea that we only wanted to
> > > substitute in constants.
> > >
> > > If this is no longer true, i'm okay with value_expr_p for now.
> >
> > That's not true in the case I try to solve.  I want us to substitute in
> >
> >  unsigned int b_2;
> >  a_1 = (int) b_2;
> >  c_2 = (unsigned int) a_1;
> >
> > so we can value-number c_2 as b_2.  Obviously a_1 doesn't have constants.
> >
> > I see has_constants is set from expr_has_constants, but this doesn't
> > check if for binary expressions the operands do not do loads.  Ah, wait -
> > if for all exprs we can assume they are gimple then I only need to
> > check for bare ssa names or constants as both tcc_unary and tcc_binary
> > operands cannot do loads.
> >
> > I'll change along this way and commit it if it works out.
> 
> Works for me :)

I reverted the SCCVN parts of the patch again because it caused bootstrap
on i686 to fail with a miscompare.

Richard.


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