Hi!

On Fri, Jun 19, 2020 at 11:47:35AM -0500, Peter Bergner wrote:
> >>    (define_mode_iterator RELOAD): Add POI and PXI.
> > 
> > Why POI and PXI, but not OI and XI?
> 
> We don't have an enabled XI or OI move pattern, so I don't think
> we'll ever see those modes at all in rtl.

Yeah good point.  And the OI/XI move expanders are probably enough to
diagnose that if ever it does go wrong.

> >> +;; Define a disabled OImode move pattern, so we can use POImode.
> >> +(define_expand "movoi"
> >> +  [(set (match_operand:OI 0 "nonimmediate_operand")
> >> +  (match_operand:OI 1 "input_operand"))]
> >> +  "0"
> >> +{
> >> +  gcc_unreachable ();
> >> +})
> > 
> > So dirty, I love it :-)
> 
> Heh, credit to Mike on this one.

Thanks Mike :-)

> > Why are OImode and XImode handled here?
> > 
> >>  static bool
> >>  rs6000_modes_tieable_p (machine_mode mode1, machine_mode mode2)
> >>  {
> 
> Do you mean why *aren't* they handled in rs6000_modes_tieable_p?

No, this is a comment about the stuff above my comment, so

> +  /* MMA accumulator modes need FPR registers divisible by 4.  We need to 
> allow
> +     XImode to have the same registers as PXImode, even though we do not 
> enable
> +     the move pattern for XImode.  */
> +  if (mode == PXImode || mode == XImode)
> +    return (TARGET_MMA && FP_REGNO_P (regno)
> +         && (regno & 3) == 0);

and the one with

> +  if (mode == POImode || mode == OImode)

before it.

> Ok, changed.  Let me know if you want me to also add OImode and XImode
> there too.

No, not handling those anywhere is fine, but let's be consistent then :-)

> > Well, it is debug info only, so not really interesting, but heh.
> > 
> >> @@ -2220,9 +2243,14 @@ rs6000_debug_reg_global (void)
> >>      V2DFmode,
> >>      V8SFmode,
> >>      V4DFmode,
> >> +    OImode,
> >> +    XImode,
> >> +    POImode,
> >> +    PXImode,
> >>      CCmode,
> >>      CCUNSmode,
> >>      CCEQmode,
> >> +    CCFPmode,
> >>    };
> > 
> > Same for the CCFP one here.
> 
> Mike added those.  I guess I thought they were needed.  Mike?
> If they're not needed for MMA, I'll remove them from this patch
> and they be submitted in a separate patch if they are needed for
> something else.

You can keep them, it's compiler debug only, but the changelog should
mention it (it looks like an accident now, which maybe it was ;-) )


Segher

Reply via email to