This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch: Fix bug in combine
- From: Roman Zippel <zippel at linux-m68k dot org>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Adrian Straetling <straetling at de dot ibm dot com>,Ian Lance Taylor <ian at airs dot com>,dalej at apple dot com,Matthias Klose <doko at cs dot tu-berlin dot de>
- Date: Wed, 12 Oct 2005 02:20:51 +0200
- Subject: Re: Patch: Fix bug in combine
- References: <77bffcc2f9ed331b38df125753838ac0@apple.com> <m3acj4tpm8.fsf@gossamer.airs.com> <434C3016.4040502@de.ibm.com>
Hi,
On Tuesday 11 October 2005 23:35, Adrian Straetling wrote:
> Ian Lance Taylor wrote:
> > Dale Johannesen <dalej@apple.com> writes:
> >>On Aug 26, 2005, at 12:15 PM, Ian Lance Taylor wrote:
> >>>>! /* If this is a constant position, we can move to the
> >>>>desired byte.
> >>>>! Be careful not to go beyond the original object. */
> >>>> if (pos_rtx == 0)
> >>>> {
> >>>>! enum machine_mode bfmode = smallest_mode_for_size (len,
> >>>>MODE_INT);
> >>>>! offset += pos / GET_MODE_BITSIZE (bfmode);
> >>>>! pos %= GET_MODE_BITSIZE (bfmode);
>
> This patch causes a bootstrap failure on s390x
> (HEAD + additional patch that adds a zero_extract pattern).
This patch also broke m68k, below is a simple test case, for which a wrong
offset is generated. Reverting the patch or applying your patch fixes the
problem.
int x;
void f(void)
{
if (x & 4095)
g();
}
This the correct output, currently it produces "x+1{#4:#12}":
f:
link.w %fp,#0
bftst x+2{#4:#12}
jbeq .L4
jbsr g
.L4:
unlk %fp
rts
bye, Roman