This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix AVR backend bug, PR target/19329
- From: Bernardo Innocenti <bernie at develer dot com>
- To: Marek Michalkiewicz <marekm at amelek dot gda dot pl>
- Cc: Giovanni Bajo <rasky at develer dot com>, gcc-patches at gcc dot gnu dot org, denisc at overta dot ru, Stefano Fedrigo <aleph at develer dot com>, Mark Mitchell <mark at codesourcery dot com>
- Date: Tue, 18 Jan 2005 23:21:38 +0100
- Subject: Re: [PATCH] Fix AVR backend bug, PR target/19329
- References: <003801c4f5c6$14dacd70$bf03030a@trilan> <41EC41A0.60401@develer.com> <20050118212633.GA20150@amelek.gda.pl>
Marek Michalkiewicz wrote:
On Mon, Jan 17, 2005 at 11:52:16PM +0100, Bernardo Innocenti wrote:
2005-01-08 Bernardo Innocenti <bernie@develer.com>
Giovanni Bajo <rasky@develer.com>
Stefano Fedrigo <aleph@develer.com>
PR target/19329
* config/avr/avr.c (ashlqi3_out, ashrqi3_out, lshrqi3_out): Handle
shifts by 0 positions.
Ping?
Sorry for the delay in my response. I haven't tested the patch myself
yet, but it is fairly simple and looks OK to me.
But:
- do we need approval from the Release Manager to apply this patch?
Mainline is currently open for bug fixes, and this is clearly a bug
fix.
For 3.4 branch, we'd need Mark's explicit approval. It's marked
as a regression in bugzilla, even though I can't prove that older
versions of GCC generated correct code.
- shouldn't this be fixed somewhere outside the AVR target, by
eliminating "shift by 0" insns completely?
I hope someone finds this other problem (which is mostly a
misoptimization), but backends need to be robust with respect
to strange input instead of silently generating wrong code.
At least we could put assertions for the 0 cases.
Meanwhile, I'll ask to leave PR19329 open in bugzilla
until the middle-end gets fixed properly.
--
// Bernardo Innocenti - Develer S.r.l., R&D dept.
\X/ http://www.develer.com/