On 16 May 2012 10:04, Michael Hope <michael.h...@linaro.org> wrote:
> Hi Ramana.  FYI, gcc trunk fails to bootstrap with:
>
> ../../../../gcc-4.8~/libgcc/libgcc2.c: In function '__mulvdi3':
> ../../../../gcc-4.8~/libgcc/libgcc2.c:397:1: internal compiler error:
> in df_uses_record, at df-scan.c:3179
>
> A cross compiler fails when building EEMBC with:
>
> (insn 1166 1165 1167 155 (set (reg:CC 24 cc)
>        (compare:CC (reg:SI 2148 [ D.6766 ])
>            (const_int 5000 [0x1388]))) iirflt01/bmark.c:501 -1
>     (nil))
> iirflt01/bmark.c:1138:1: internal compiler error: in extract_insn, at
> recog.c:2131

Here's a reduced testcase and an untested fix which is also upstream now at :

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53376


  * arm.md (movsicc): Adjust operands for the comparison.

extern int x;
static long long p;
static long long *h1 ;
static long long *h2 ;

void foo (void)
{
    int i ;
    for( i = 0 ; i < x ; i++ )
    {
      if( (p >> 3)  > 5000)
            p += 5000;
        *h2 = *h1 ;
        h2++;
    }
}





diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md
index b1ad3bf..04be822 100644
--- a/gcc/config/arm/arm.md
+++ b/gcc/config/arm/arm.md
@@ -8144,6 +8144,9 @@
     if (code == UNEQ || code == LTGT)
       FAIL;

+    if (!arm_add_operand (XEXP (operands[1], 1), SImode))
+      XEXP (operands[1], 1) = force_reg (SImode, XEXP (operands[1], 1));
+
     ccreg = arm_gen_compare_reg (code, XEXP (operands[1], 0),
                                 XEXP (operands[1], 1), NULL_RTX);
     operands[1] = gen_rtx_fmt_ee (code, VOIDmode, ccreg, const0_rtx);



regards,
Ramana



>
> The last revision that bootstrapped was 187203.  187223 and 187275 failed.
>
> -- Michael

_______________________________________________
linaro-toolchain mailing list
linaro-toolchain@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-toolchain

Reply via email to