Tom de Vries <tom_devr...@mentor.com> writes: > On 27-04-14 12:27, Richard Sandiford wrote: >> Tom de Vries <tom_devr...@mentor.com> writes: >>> mips_emit_call_insn (rtx pattern, rtx orig_addr, rtx addr, bool lazy_p) >>> { >>> rtx insn, reg; >>> >>> - insn = emit_call_insn (pattern); >>> + emit_call_insn (pattern); >>> + insn = last_call_insn (); >>> >>> if (TARGET_MIPS16 && mips_use_pic_fn_addr_reg_p (orig_addr)) >>> { >> >> This change isn't necessary; emit_call_insn is defined to return a CALL_INSN. >> > > I dropped this change, as well as the change in the untyped_call expand, I > realized it's unnecessary.
Why was the untyped_call part unnecessary? >> I'm a bit surprised that it doesn't work at -O1 for a simple test >> like this though. What goes wrong? >> > > AFAIU now the problem is that the optimization doesn't trigger for -O0 > and -01, because the register allocator behaves more conservatively. Hmm, is that just because -fcaller-saves is -O2 and above? If so, should -fuse-caller-save imply -fcaller-saves? Thanks, Richard