expand_binop misplacing results?
Roger Sayle
roger@eyesopen.com
Tue Mar 22 06:48:00 GMT 2005
Hi DJ,
On Mon, 21 Mar 2005, DJ Delorie wrote:
> 2005-03-21 DJ Delorie <dj@redhat.com>
>
> * optabs.c (expand_binop): Make sure the first subword's result
> gets stored.
This is OK for mainline, provided that you bootstrap and regression
test it somewhere. Thanks. You're quite right that callers can't
rely on expand_binop placing the result in target, however most
backends and RTL expansion sequences try hard to honor the request.
There does appear to be a bug in the "i == 0" case, which has probably
never been an issue as most targets are either able to place the
result of the addition/subtraction in the requested destination or
provide their own adddi3/addti3 expanders.
Thanks for finding/fixing this. This might be a candidate for backporting
to the GCC 4.0 branch if we can find a target/testcase that triggers a
problem.
Roger
--
More information about the Gcc
mailing list