------- Comment #8 from matz at gcc dot gnu dot org  2006-11-10 15:51 -------
At least this patch fixes the bug at hand, but I'm sceptical if by chance or
for real:

Index: ifcvt.c
===================================================================
--- ifcvt.c     (revision 118648)
+++ ifcvt.c     (working copy)
@@ -1942,6 +1942,8 @@ noce_try_bitop (struct noce_if_info *if_
        return FALSE;
       bitnum = INTVAL (XEXP (cond, 2));
       mode = GET_MODE (x);
+      if (BITS_BIG_ENDIAN)
+       bitnum = GET_MODE_BITSIZE (mode) - 1 - bitnum;
       if (bitnum >= HOST_BITS_PER_WIDE_INT)
        return FALSE;
     }


-- 


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

Reply via email to