> The file.c.176r.greg for insn 309 says > > "Spilling for insn 309. > Using reg 6 for reload 0" > > and indeed rld[0].regno is 6 and rld[0].in is > > (plus:SI (reg/f:SI 29 $sp) > (const_int 176 [0xb0])) > > However the function choose_reload_regs chooses $c1 for this reload > and sets rld[0].reg_rtx to the rtl expression for $c1.
The reload pass features a few "optimizations" that can bypass the initial selection. > I am confused whether reg_rtx should always be the rtl expression for > regno ? No, not always. > Anyways shouldnt reload be checking for live registers before reloading into > them ? Of course, it goes to great length to do so but there can be bugs. You didn't specify which version of the compiler you're using though; they may have been already fixed on the mainline. -- Eric Botcazou