Hi! On Fri, Feb 07, 2020 at 03:10:05PM +0800, Jiufu Guo wrote: > Segher Boessenkool <seg...@kernel.crashing.org> writes: > > On Thu, Feb 06, 2020 at 10:49:36AM +0800, Jiufu Guo wrote: > >> > ... and nothing in the rtl stream says that those return registers are > >> > actually set by that call. Maybe we should use gen_call_value? Can we > >> > ever be asked to return more than a single thing here? > >> I was also thinking about using "gen_call_value" or "emit_clobber (r3)" > >> which could generate rtl: "%3:DI=call [foo]" or "call [foo]; clobber > >> r3". This could tell optimizer that %3 is changed. > > > > The problem with "call ; clobber r3" is that some set+use of a pseudo can > > be moved between these, and then rnreg can rename that to r3 again. We > > really need to show the call sets r3, in the general case (or that r3 is > > live after the call, at least). > Thanks! More careful thought You are right: set+use maybe able to move > between "call ; > clobber". "%3=call" is ok without this issue.
Yeah. And we do not know which of the register will be used for the return, in untyped_call (only untyped-return knows). But we can add clobbers of all registers that *might* be used for the return, we do know that here, see operands[2] of untyped_call. This really should be done in generic code though? Segher