avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] [WinAVR 20090313] Bug in split-Pattern for swap


From: Georg-Johann Lay
Subject: Re: [avr-gcc-list] [WinAVR 20090313] Bug in split-Pattern for swap
Date: Mon, 06 Apr 2009 13:15:09 +0200
User-agent: Thunderbird 2.0.0.21 (Windows/20090302)

Weddington, Eric schrieb:
It probably comes from the attached patch. This was a fix for GCC bug #11259:
<http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11259>
This was committed in 4.4.

Eric Weddington

Yes, that patch introduces the bug because operand0 resp. operand1 may be hard reg before reload, which is the case here (#0=r24, #1=r25).

The patterns are using constraint "0" which is pretty much useless for the split part of the define_insn_and_split before reload, and therefore no one actually ensures that input and output operands are the same. It will work for pseudos, but not if a hard register is involved.

The simplest fix is to split only if reload_completed or just omit the patch because in newer versions the UNSPEC_SWAP will have gone anyway.

Georg-Johann





reply via email to

[Prev in Thread] Current Thread [Next in Thread]