Commit 4488a8b8 by Richard Henderson Committed by Richard Henderson

simplify-rtx.c (simplify_subreg): Use subreg_regno_offset directly instead of…

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
parent b2cfdb12
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> 2004-11-23 Kazu Hirata <kazu@cs.umass.edu>
* tree-cfg.c (tree_forwarder_block_p): Speed up by reordering * tree-cfg.c (tree_forwarder_block_p): Speed up by reordering
......
...@@ -3675,14 +3675,15 @@ simplify_subreg (enum machine_mode outermode, rtx op, ...@@ -3675,14 +3675,15 @@ simplify_subreg (enum machine_mode outermode, rtx op,
&& subreg_offset_representable_p (REGNO (op), innermode, && subreg_offset_representable_p (REGNO (op), innermode,
byte, outermode)) byte, outermode))
{ {
rtx tem = gen_rtx_SUBREG (outermode, op, byte); unsigned int regno = REGNO (op);
int final_regno = subreg_hard_regno (tem, 0); unsigned int final_regno
= regno + subreg_regno_offset (regno, innermode, byte, outermode);
/* ??? We do allow it if the current REG is not valid for /* ??? We do allow it if the current REG is not valid for
its mode. This is a kludge to work around how float/complex its mode. This is a kludge to work around how float/complex
arguments are passed on 32-bit SPARC and should be fixed. */ arguments are passed on 32-bit SPARC and should be fixed. */
if (HARD_REGNO_MODE_OK (final_regno, outermode) 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); rtx x = gen_rtx_REG_offset (op, outermode, final_regno, byte);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment