Hi!

On Wed, Jan 13, 2021 at 02:15:04PM -0800, Carl Love wrote:
> The patch was compiled and tested on:
> 
>    powerpc64le-unknown-linux-gnu (Power 8 BE)

(I assume you mean powerpc64-linux instead?)

> > Presumably it is safe (no side affects) when adding V4SI and V2DI here,
> > with respect to other current users of 'bits'.
> > Is it worth adding the
> > other modes while we are here? (V1TI, V8HI, V16QI ).
> 
> I did not add the additional modes.  I don't see any reason it would
> hurt but feel it is best to only add them when they are needed.

Either works, sure.  Having all but one vector modes covered is silly
(and can give people the idea something is special with that one mode),
but you have only two so far, so :-)

> --- a/gcc/config/rs6000/rs6000.md
> +++ b/gcc/config/rs6000/rs6000.md
> @@ -670,7 +670,8 @@
>  
>  ;; How many bits in this mode?
>  (define_mode_attr bits [(QI "8") (HI "16") (SI "32") (DI "64")
> -                                        (SF "32") (DF "64")])
> +                                        (SF "32") (DF "64")
> +                                        (V4SI "32") (V2DI "64")])

The comment needs a clarification what this means for vector modes.
"How many bits (per element) in this mode?" perhaps?  Does that sound
good?

The patch is okay for trunk with such a tweak.  Thank you!


Segher

Reply via email to