re PR middle-end/7796 (sparc-sun-solaris2.7 extra failure w/-m64 on execute/930921...
authorEric Botcazou <ebotcazou@gcc.gnu.org>
Sat, 8 Mar 2003 07:32:36 +0000 (07:32 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Sat, 8 Mar 2003 07:32:36 +0000 (07:32 +0000)
PR middle-end/7796
* unroll.c (calculate_giv_inc): Handle constants being
loaded with LSHIFTRT.

From-SVN: r63971

gcc/ChangeLog
gcc/unroll.c

index db014873ee3796fd1d606f59d4f197fcd38a5343..663b3eb543043f43d9f74d439781c9e7a7ed75b7 100644 (file)
@@ -1,3 +1,9 @@
+2003-03-08  Eric Botcazou  <ebotcazou@libertysurf.fr>
+
+       PR middle-end/7796
+       * unroll.c (calculate_giv_inc): Handle constants being
+       loaded with LSHIFTRT.
+
 2003-03-07  David Edelsohn  <edelsohn@gnu.org>
 
        * config/rs6000/rs6000.c (processor_target_table): Do not disable
@@ -20,7 +26,7 @@
 
 2003-03-07  James E Wilson  <wilson@tuliptree.org>
 
-        * config/sh/sh.h (HARD_REGNO_NREGS): Round up the XD register count.
+       * config/sh/sh.h (HARD_REGNO_NREGS): Round up the XD register count.
 
 2003-03-07  Geoffrey Keating  <geoffk@apple.com>
 
index 982b32dfbf2fc85f9660ed8a99edffe8ee5b4593..3b5dd7c91f8c1eeccea8a5d75ccf86d2fe91b995 100644 (file)
@@ -1624,11 +1624,13 @@ calculate_giv_inc (pattern, src_insn, regno)
        }
 
       else if (GET_CODE (increment) == IOR
+              || GET_CODE (increment) == PLUS
               || GET_CODE (increment) == ASHIFT
-              || GET_CODE (increment) == PLUS)
+              || GET_CODE (increment) == LSHIFTRT)
        {
          /* The rs6000 port loads some constants with IOR.
-            The alpha port loads some constants with ASHIFT and PLUS.  */
+            The alpha port loads some constants with ASHIFT and PLUS.
+            The sparc64 port loads some constants with LSHIFTRT.  */
          rtx second_part = XEXP (increment, 1);
          enum rtx_code code = GET_CODE (increment);
 
@@ -1645,8 +1647,10 @@ calculate_giv_inc (pattern, src_insn, regno)
            increment = GEN_INT (INTVAL (increment) | INTVAL (second_part));
          else if (code == PLUS)
            increment = GEN_INT (INTVAL (increment) + INTVAL (second_part));
-         else
+         else if (code == ASHIFT)
            increment = GEN_INT (INTVAL (increment) << INTVAL (second_part));
+         else
+           increment = GEN_INT ((unsigned HOST_WIDE_INT) INTVAL (increment) >> INTVAL (second_part));
        }
 
       if (GET_CODE (increment) != CONST_INT)