This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: simplify_subreg vs CONCAT
- To: gcc-patches at gcc dot gnu dot org
- Subject: PATCH: simplify_subreg vs CONCAT
- From: DJ Delorie <dj at redhat dot com>
- Date: Tue, 12 Jun 2001 21:52:03 -0400
2001-06-12 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.
Index: simplify-rtx.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/simplify-rtx.c,v
retrieving revision 1.60
diff -p -3 -r1.60 simplify-rtx.c
*** simplify-rtx.c 2001/06/11 09:30:47 1.60
--- simplify-rtx.c 2001/06/13 01:50:32
*************** simplify_subreg (outermode, op, innermod
*** 2426,2434 ****
int is_realpart = byte < GET_MODE_UNIT_SIZE (innermode);
rtx part = is_realpart ? XEXP (op, 0) : XEXP (op, 1);
unsigned int final_offset;
final_offset = byte % (GET_MODE_UNIT_SIZE (innermode));
! return simplify_subreg (outermode, part, GET_MODE (part), final_offset);
}
return NULL_RTX;
--- 2426,2439 ----
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));
! 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;