summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordj <dj@138bc75d-0d04-0410-961f-82ee72b054a4>2001-06-29 21:15:01 +0000
committerdj <dj@138bc75d-0d04-0410-961f-82ee72b054a4>2001-06-29 21:15:01 +0000
commitddf7cbcf3cb2d4df7cd809c65ed98359027b7a5a (patch)
tree6b5797e3fd986b6af8e3abbbb0324e55a0e0565a
parent7bae36c2d1c4b9dcf990421404047c2e9e2419e1 (diff)
downloadppe42-gcc-ddf7cbcf3cb2d4df7cd809c65ed98359027b7a5a.tar.gz
ppe42-gcc-ddf7cbcf3cb2d4df7cd809c65ed98359027b7a5a.zip
* simplify-rtx.c (simplify_subreg): When simplifying a CONCAT, at
least get rid of the CONCAT if we can't simplify further. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@43659 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/simplify-rtx.c7
2 files changed, 11 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 407ae100a22..1feafbef801 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c
index a5ef0993600..20471cc5d5e 100644
--- a/gcc/simplify-rtx.c
+++ b/gcc/simplify-rtx.c
@@ -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;
OpenPOWER on IntegriCloud