Hi! On Fri, Aug 07, 2020 at 05:16:30PM -0500, Peter Bergner wrote: > We do not allow conversions between the MMA types and other types. > However, we are being too strict in not matching MMA types with > typdefs of those types. Use TYPE_CANONICAL to see through the > types to their canonical types before comparing them.
> --- a/gcc/config/rs6000/rs6000.c > +++ b/gcc/config/rs6000/rs6000.c > @@ -26803,34 +26803,48 @@ rs6000_cannot_substitute_mem_equiv_p (rtx mem) > static const char * > rs6000_invalid_conversion (const_tree fromtype, const_tree totype) > { > - if (element_mode (fromtype) != element_mode (totype)) > + /* Make sure we're working with the canonical types. */ > + if (TYPE_CANONICAL (fromtype) != NULL_TREE) > + fromtype = TYPE_CANONICAL (fromtype); > + if (TYPE_CANONICAL (totype) != NULL_TREE) > + totype = TYPE_CANONICAL (totype); > + > + machine_mode frommode = element_mode (fromtype); > + machine_mode tomode = element_mode (totype); > + > + if (frommode != tomode) > { > /* Do not allow conversions to/from PXImode and POImode types. */ > - if (TYPE_MODE (fromtype) == PXImode) > + if (frommode == PXImode) The element_mode vs. TYPE_MODE here does not matter, because we never deal with vector modes here, and they will error elsewhere anyway? Okay for trunk if that is true (or with the necessary adjustments), and okay for 10 after letting it soak for a bit. Thanks! Segher