This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
patch: make note_sets handle subregs
- From: Aldy Hernandez <aldyh at redhat dot com>
- To: rth at redhat dot com, gcc-patches at gcc dot gnu dot org
- Date: Fri, 21 Jan 2005 21:18:38 -0400
- Subject: patch: make note_sets handle subregs
Richard found this while helping me with a regression. I've tested it
on powerpc-linux.
OK for mainline?
* regrename.c (note_sets): Handle subregs.
Index: regrename.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/regrename.c,v
retrieving revision 1.95
diff -c -p -r1.95 regrename.c
*** regrename.c 17 Jan 2005 22:02:28 -0000 1.95
--- regrename.c 22 Jan 2005 01:15:55 -0000
*************** note_sets (rtx x, rtx set ATTRIBUTE_UNUS
*** 94,99 ****
--- 94,102 ----
HARD_REG_SET *pset = (HARD_REG_SET *) data;
unsigned int regno;
int nregs;
+
+ if (GET_CODE (x) == SUBREG)
+ x = SUBREG_REG (x);
if (!REG_P (x))
return;
regno = REGNO (x);