RFA: Fix regrename bug for multi-register values

Mark Mitchell mark@codesourcery.com
Fri Aug 20 05:03:00 GMT 2004

Daniel Jacobowitz wrote:

>I have a testcase for GCC 3.3.1 in which a DFmode value (arm-elf,
>-msoft-float) is allocated to registers fp and ip.  Fp is call-saved, but ip
>is call-clobbered.  Regrename copyprops this value across a CALL_INSN,
>because calling kill_value_regno (IP_REGNUM, vd) doesn't kill a two-register
>value living in FP_REGNUM.
>I can't reproduce the bug in 3.4 or HEAD, but the bad code is still there.
>Patch OK?
I'm going to call that pretty much obviously correct, as long as you've 
tested it somewhere.

I think it would be mildly clearer to pass the mode (rather than the 
number of registers) to kill_value_regno, and let it do the 
hard_regno_regs thing itself; that makes the function a little more 
abstract.  So, please make that change as well.

Mark Mitchell
CodeSourcery, LLC
(916) 791-8304

More information about the Gcc-patches mailing list