diff options
author | Richard Henderson <rth@redhat.com> | 2004-11-23 15:03:15 -0800 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2004-11-23 15:03:15 -0800 |
commit | 4488a8b8769d54a19634d22c42bd9ec111a89be5 (patch) | |
tree | d1a76f18f5ec7676024c59484c69a8c80a10e55b /gcc | |
parent | b2cfdb12c2501e363ca16a497df70c7459da3ef4 (diff) | |
download | gcc-4488a8b8769d54a19634d22c42bd9ec111a89be5.zip gcc-4488a8b8769d54a19634d22c42bd9ec111a89be5.tar.gz gcc-4488a8b8769d54a19634d22c42bd9ec111a89be5.tar.bz2 |
simplify-rtx.c (simplify_subreg): Use subreg_regno_offset directly instead of using a SUBREG temporary.
* simplify-rtx.c (simplify_subreg): Use subreg_regno_offset directly
instead of using a SUBREG temporary.
From-SVN: r91114
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/simplify-rtx.c | 7 |
2 files changed, 9 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a16e9b6..9752df3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2004-11-23 Richard Henderson <rth@redhat.com> + + * simplify-rtx.c (simplify_subreg): Use subreg_regno_offset directly + instead of using a SUBREG temporary. + 2004-11-23 Kazu Hirata <kazu@cs.umass.edu> * tree-cfg.c (tree_forwarder_block_p): Speed up by reordering diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index ac896ab..8ecd8fc 100644 --- a/gcc/simplify-rtx.c +++ b/gcc/simplify-rtx.c @@ -3675,14 +3675,15 @@ simplify_subreg (enum machine_mode outermode, rtx op, && subreg_offset_representable_p (REGNO (op), innermode, byte, outermode)) { - rtx tem = gen_rtx_SUBREG (outermode, op, byte); - int final_regno = subreg_hard_regno (tem, 0); + unsigned int regno = REGNO (op); + unsigned int final_regno + = regno + subreg_regno_offset (regno, innermode, byte, outermode); /* ??? We do allow it if the current REG is not valid for its mode. This is a kludge to work around how float/complex arguments are passed on 32-bit SPARC and should be fixed. */ if (HARD_REGNO_MODE_OK (final_regno, outermode) - || ! HARD_REGNO_MODE_OK (REGNO (op), innermode)) + || ! HARD_REGNO_MODE_OK (regno, innermode)) { rtx x = gen_rtx_REG_offset (op, outermode, final_regno, byte); |