Fix alpha loop unrolling abort.
authorJim Wilson <wilson@cygnus.com>
Sun, 31 Aug 1997 05:57:40 +0000 (05:57 +0000)
committerJim Wilson <wilson@gcc.gnu.org>
Sun, 31 Aug 1997 05:57:40 +0000 (22:57 -0700)
* unroll.c (calculate_giv_inc): Handle increment with code PLUS.

From-SVN: r15004

gcc/ChangeLog
gcc/unroll.c

index 058eb9ef0fd141cbfec1fc376ff757498c23a01a..a3373773329796c6e272549b3f0344416f15a70e 100644 (file)
@@ -1,3 +1,7 @@
+Sat Aug 30 22:54:26 1997  Jim Wilson  <wilson@cygnus.com>
+
+       * unroll.c (calculate_giv_inc): Handle increment with code PLUS.
+
 Sat Aug 30 10:49:46 1997  David Edelsohn  <edelsohn@mhpcc.edu>
 
        * rs6000.md: Make DF fused-add operations pay attention to
index 2fb1f9a8415890d84c8f529f68acf1b6f8ada9ee..ce6623c37cd750cd784311b0251e0c3d3ec76242 100644 (file)
@@ -1495,10 +1495,11 @@ calculate_giv_inc (pattern, src_insn, regno)
       if (GET_CODE (increment) == LO_SUM)
        increment = XEXP (increment, 1);
       else if (GET_CODE (increment) == IOR
-              || GET_CODE (increment) == ASHIFT)
+              || GET_CODE (increment) == ASHIFT
+              || GET_CODE (increment) == PLUS)
        {
          /* The rs6000 port loads some constants with IOR.
-            The alpha port loads some constants with ASHIFT.  */
+            The alpha port loads some constants with ASHIFT and PLUS.  */
          rtx second_part = XEXP (increment, 1);
          enum rtx_code code = GET_CODE (increment);
 
@@ -1513,6 +1514,8 @@ calculate_giv_inc (pattern, src_insn, regno)
 
          if (code == IOR)
            increment = GEN_INT (INTVAL (increment) | INTVAL (second_part));
+         else if (code == PLUS)
+           increment = GEN_INT (INTVAL (increment) + INTVAL (second_part));
          else
            increment = GEN_INT (INTVAL (increment) << INTVAL (second_part));
        }