This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: CSE removing a load that is necessary

> Where does reg 178 come from?  It does not appear in the other insns
> you listed.

I am sorry, my mistake. I meant to say that the dump was only a part
of the entire dump of the function. reg 178 is the result of a
previous call to __floatsidf and is defined by the following insn.

(insn 19 18 21 2 test.c:356 (set (reg:SI 178 [+4 ])
        (mem/c/i:SI (plus:SI (reg/f:SI 112 *fp*)
                (const_int 4 [0x4])) [7 S4 A32])) 44 {*movsi}
(expr_list:REG_LIBCALL_ID (const_int 1 [0x1])
        (expr_list:REG_EQUAL (float:DF (reg:SI 136 [ D.1517 ]))

> Am I reading your code correctly when it appears that the
> __floatunsidf function returns a value in memory rather than via a
> register?

For our architecture, we have had to follow this convention of
returning a double value by storing it in memory and loading it after
the function call. The ABI reserves only one SI mode register for
return values and hence the use of memory for returning a double.

> If lower-subreg split up the load from memory, then it was correct to
> remove the REG_RETVAL note.  There may be a bug here in that it should
> also remove the REG_EQUAL note in that case.  It may be that
> remove_retval_note needs to look for and remove a REG_EQUAL note.

Ok, so the approach should be to fix remove_retval_note to have it
remove REG_EQUAL note too rather than not call remote_retval_note at
all. I will submit a patch for comments.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]