simplify-rtx.c (simplify_subreg): When simplifying a CONCAT...
authorDJ Delorie <dj@redhat.com>
Fri, 29 Jun 2001 21:15:01 +0000 (17:15 -0400)
committerDJ Delorie <dj@gcc.gnu.org>
Fri, 29 Jun 2001 21:15:01 +0000 (17:15 -0400)
* simplify-rtx.c (simplify_subreg): When simplifying a CONCAT, at
least get rid of the CONCAT if we can't simplify further.

From-SVN: r43659

gcc/ChangeLog
gcc/simplify-rtx.c

index 407ae100a2239acb8e3256402bfd390f34a7c4c3..1feafbef801eb1e93ba59030c55e23d9979964f9 100644 (file)
@@ -1,3 +1,8 @@
+2001-06-29  DJ Delorie  <dj@redhat.com>
+
+       * simplify-rtx.c (simplify_subreg): When simplifying a CONCAT, at
+       least get rid of the CONCAT if we can't simplify further.
+
 Fri Jun 29 12:27:24 2001  Jeffrey A Law  (law@cygnus.com)
 
        * ssa-dce.c (ssa_eliminate_dead_code): Renamed from
index a5ef099360084e3e2e4ea62d126ffb95d726fa01..20471cc5d5ef6c8f147dde60008c5bd51356e0ec 100644 (file)
@@ -2430,9 +2430,14 @@ simplify_subreg (outermode, op, innermode, byte)
       int is_realpart = byte < GET_MODE_UNIT_SIZE (innermode);
       rtx part = is_realpart ? XEXP (op, 0) : XEXP (op, 1);
       unsigned int final_offset;
+      rtx res;
 
       final_offset = byte % (GET_MODE_UNIT_SIZE (innermode));
-      return simplify_subreg (outermode, part, GET_MODE (part), final_offset);
+      res = simplify_subreg (outermode, part, GET_MODE (part), final_offset);
+      if (res)
+       return res;
+      /* We can at least simplify it by referring directly to the relevent part. */
+      return gen_rtx_SUBREG (outermode, part, final_offset);
     }
 
   return NULL_RTX;