https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89582

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #2)
> So compared to the already mitigated PR84101 this one returns in
> 
> (parallel:TI [
>         (expr_list:REG_DEP_TRUE (reg:DF 20 xmm0)
>             (const_int 0 [0]))
>         (expr_list:REG_DEP_TRUE (reg:DF 21 xmm1)
>             (const_int 8 [0x8]))
>     ])
> 
> so I wonder how targets represent if they return the _same_ value in
> two different locations.  I also wonder whether the above is any
> standard form.

From docs of (set ...):

If @var{lval} is a @code{parallel}, it is used to represent the case of
a function returning a structure in multiple registers.  Each element
of the @code{parallel} is an @code{expr_list} whose first operand is a
@code{reg} and whose second operand is a @code{const_int} representing the
offset (in bytes) into the structure at which the data in that register
corresponds.  The first element may be null to indicate that the structure
is also passed partly in memory.

I guess if the offset is the same (or overlapping) that can handle
multiple locations for the same value.

For the vfloat testcase the return value on x86 is in the following
(note reg:DI pieces vs. reg:V2SF vs. reg:DF for the vdouble case)

(parallel:TI [
        (expr_list:REG_DEP_TRUE (reg:DI 20 xmm0)
            (const_int 0 [0]))
        (expr_list:REG_DEP_TRUE (reg:DI 21 xmm1)
            (const_int 8 [0x8]))
    ])

Reply via email to