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: assign_parm_setup_block handling of parallels

Hi folks.  Sorry I took so long.  I was attempting to go on vacation,
ignore this, and hoping it would magically be done when I returned.
(It wasn't).

> > We're changing the port to emit:
> > 	(parallel:DF (expr_list (reg:DI 3)))
> >
> > instead of:
> >
> > 	(parallel:DF (expr_list (reg:SI 3) (reg:SI 4)))
> >
> > because of the plethory of subregs and bad code GCC generates.
> OK, but what do you expect to achieve by running the multi-member parallel 
> optimization on an one-member parallel?

First, some background.  I'm attaching my testcase.  As you can see,
nominal_mode (SFmode) != passed_mode (DFmode).

The multi-member optimization will nicely translate this:

(parallel:DF (expr_list (reg:DI 3)))


  (reg:DI 3) -> pseudoDI -> subreg:DF(pseudoDI) -> float_truncate:SF(DF)

which is exactly what we want, and gets flattened and joined back into
the appropriate registers.

That being said, my current ICE is actually triggered elsewhere.  If we
don't use the above optimization, we fall through to:

  /* If a BLKmode arrives in registers, copy it to a stack slot.  Handle
     calls that pass values in multiple non-contiguous locations.  */

...which will set DECL_RTL to:

(mem/i:DF (plus:SI (reg/f:SI 114 virtual-stack-vars)
        (const_int 8 [0x8])) [0 f+0 S4 A32])

I believe (??) this is incorrect.  Shouldn't the DECL_RTL be an SFmode?
This causes an ICE later in emit_move_insn when trying to move this DF to
an SF.

In the multi-member parallel optimization, we already check for 
incompatability between nominal_mode and passed_mode, and do the conversion

Although I think we should do the conversion in this case as well, I
believe we will generate better code if we allow the multi-member
parallel optimization.

Richard?  Eric?


Attachment: a.c
Description: Text document

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