This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: expand_binop misplacing results?
- From: Roger Sayle <roger at eyesopen dot com>
- To: DJ Delorie <dj at redhat dot com>
- Cc: gcc at gcc dot gnu dot org, <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 21 Mar 2005 21:33:10 -0700 (MST)
- Subject: Re: expand_binop misplacing results?
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
--