]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR middle-end/7796 (sparc-sun-solaris2.7 extra failure w/-m64 on execute/930921...
authorEric Botcazou <ebotcazou@libertysurf.fr>
Sat, 8 Mar 2003 07:42:41 +0000 (08:42 +0100)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Sat, 8 Mar 2003 07:42:41 +0000 (07:42 +0000)
PR middle-end/7796
* unroll.c (calculate_giv_inc): Handle constants being
loaded with LSHIFTRT.

From-SVN: r63973

gcc/ChangeLog
gcc/unroll.c

index c76147bf7c57466d265cad711d18fa0dbd542191..ccdb5c812039534922abdd5caa867dea174605a4 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  Eric Botcazou  <ebotcazou@libertysurf.fr>
 
        PR optimization/8726
index 83327c7ba4cfaa0e0a296d34b3b308da0052b6c2..b9232274add66fa9367cbd110fbcf06bf34b883d 100644 (file)
@@ -1636,11 +1636,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);
 
@@ -1657,8 +1659,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)