[3.4-BIB] Fix infinite recursion during ADA bootstrap on i486 II
Jan Hubicka
jh@suse.cz
Sun Dec 1 08:08:00 GMT 2002
> Hi,
> Some extra checking shown that I did a thinko in mode promoting stuff.
> Bootstrapped both i386 and i486 with Ada on BIB branch.
> OK now?
>
> Sat Nov 30 17:09:33 CET 2002 Jan Hubicka <jh@suse.cz>
> * i386.c (ix86_expand_int_movcc): Always optimize constants;
> promote HImode to SImode early; fix reversed BRANCH_COST test;
> be curefull about infinite recursion.
Hi,
this is getting more involved I've previously expected. The HImode
promoting code has hit another bug so it causes x86_64 bootstrap to
fail. I've installed the atached patch as obvious that fixes the
infinite recursion and wrong comparison and will continue by separate
patch to cleanup the code somewhat before adding the new feature.
I am sorry for the noise.
Sat Nov 30 17:09:33 CET 2002 Jan Hubicka <jh@suse.cz>
* i386.c (ix86_expand_int_movcc): promote HImode to SImode early; fix
reversed BRANCH_COST test; be curefull about infinite recursion.
Index: i386.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.c,v
retrieving revision 1.490.2.5
diff -c -3 -p -r1.490.2.5 i386.c
*** i386.c 28 Nov 2002 23:19:47 -0000 1.490.2.5
--- i386.c 30 Nov 2002 16:09:26 -0000
*************** ix86_expand_int_movcc (operands)
*** 9546,9552 ****
optab op;
rtx var, orig_out, out, tmp;
! if (BRANCH_COST >= 2)
return 0; /* FAIL */
/* If one of the two operands is an interesting constant, load a
--- 9553,9559 ----
optab op;
rtx var, orig_out, out, tmp;
! if (BRANCH_COST <= 2)
return 0; /* FAIL */
/* If one of the two operands is an interesting constant, load a
*************** ix86_expand_int_movcc (operands)
*** 9555,9563 ****
if (GET_CODE (operands[2]) == CONST_INT)
{
var = operands[3];
! if (INTVAL (operands[2]) == 0)
operands[3] = constm1_rtx, op = and_optab;
! else if (INTVAL (operands[2]) == -1)
operands[3] = const0_rtx, op = ior_optab;
else
return 0; /* FAIL */
--- 9562,9570 ----
if (GET_CODE (operands[2]) == CONST_INT)
{
var = operands[3];
! if (INTVAL (operands[2]) == 0 && operands[3] != constm1_rtx)
operands[3] = constm1_rtx, op = and_optab;
! else if (INTVAL (operands[2]) == -1 && operands[3] != const0_rtx)
operands[3] = const0_rtx, op = ior_optab;
else
return 0; /* FAIL */
*************** ix86_expand_int_movcc (operands)
*** 9565,9573 ****
else if (GET_CODE (operands[3]) == CONST_INT)
{
var = operands[2];
! if (INTVAL (operands[3]) == 0)
operands[2] = constm1_rtx, op = and_optab;
! else if (INTVAL (operands[3]) == -1)
operands[2] = const0_rtx, op = ior_optab;
else
return 0; /* FAIL */
--- 9572,9580 ----
else if (GET_CODE (operands[3]) == CONST_INT)
{
var = operands[2];
! if (INTVAL (operands[3]) == 0 && operands[2] != constm1_rtx)
operands[2] = constm1_rtx, op = and_optab;
! else if (INTVAL (operands[3]) == -1 && operands[3] != const0_rtx)
operands[2] = const0_rtx, op = ior_optab;
else
return 0; /* FAIL */
More information about the Gcc-patches
mailing list