On Thu, Aug 08, 2024 at 06:03:13AM -0600, Jeff Law wrote:
> 
> 
> On 8/8/24 5:15 AM, Stefan Schulze Frielinghaus via Gcc wrote:
> 
> > 
> > However `(reg:DI 61 [ MEM[(const union T *)p_2(D)] ])` referencing the
> > same pseudo in a different mode is not substituted in insn 6 which
> > leads in the following to an error.  The insn is emitted in
> > s390_expand_insv() during
> There can only be a single instance of a given pseudo, if you have multiple
> instances, that's the bug.

Yeah I was fearing this might be the culprit.

> 
> > 
> 
> > rtx
> > s390_gen_lowpart_subreg (machine_mode mode, rtx expr)
> > {
> >    rtx lowpart = gen_lowpart (mode, expr);
> > 
> >    /* There might be no SUBREG in case it could be applied to the hard
> >       REG rtx or it could be folded with a paradoxical subreg.  Bring
> >       it back.  */
> >    if (!SUBREG_P (lowpart))
> >      {
> >        machine_mode reg_mode = TARGET_ZARCH ? DImode : SImode;
> >        gcc_assert (REG_P (lowpart));
> >        lowpart = gen_lowpart_SUBREG (mode,
> >                                      gen_rtx_REG (reg_mode,
> >                                                   REGNO (lowpart)));
> Yup, that's your problem I think.  You can't create another instance of the
> pseudo like that.

Thanks for confirmation.  I will come up with a fix.

Cheers,
Stefan

Reply via email to