Patch: Fix bug in combine
Roman Zippel
zippel@linux-m68k.org
Wed Oct 12 00:31:00 GMT 2005
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
More information about the Gcc-patches
mailing list