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 AVR backend bug, PR target/19329


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/


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