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: Obvious expand_builtin_mathfn improvement installed


> Jan Hubicka <hubicka@ucw.cz> writes:
> 
> > Hi,
> > I am installing the atached patch as obvious.  It avoid
> > expand_builtin_mathfn(_2) from doing the busy work of creating dummy
> > seqeuences, stablizing and expanding operands when the builtin is not
> > supported by target.
> 
> Ok.
> 
> > The main motivation is however to mask the bug that previously shown up
> > as eon misscopmilation.  This bug makes periodic testers to loop forever
> > disturbing them completely.  Recently the tree is changing rapidly and
> > it is quite neccesary to have it logged.
> 
> Could you be a little clearer about this bug, and why your patch
> affects it?

THere is already Roger's fix waiting in the queue to be reviewed, but
apparently Richard is taking a break...

What the function does later is to expand operands into sequence and try
to expand the builtin.  When it fails it throws it all out and later the
generic code expands the call in normal way.
In the case operand is something complex, like inlined function the
re-expansion of operand breaks and you get misscompilation.

My patch simply avoids all the machinery when the named pattern for
given builtin is missing.
Roger's patch is still needed for targets that do define the pattern but
the expansion fails anyway.

Honza
> 
> zw


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