Re: [PATCH] emit-rtl.c: Allow vector subreg of float vectors

2020-08-10 Thread Richard Sandiford
"Stubbs, Andrew" writes: > Is GET_INNER_MODE valid for scalers though? Yeah, GET_MODE_INNER (x) == x for scalars. That makes GET_MODE_INNER useful for stripping vectorness or complexness without having to check for them first. It's also useful when working out what the valid shift ranges are fo

Re: [PATCH] emit-rtl.c: Allow vector subreg of float vectors

2020-08-10 Thread Stubbs, Andrew
On 10 Aug 2020 17:23, Richard Sandiford wrote: Andrew Stubbs writes: > On 06/08/2020 04:54, Richard Sandiford wrote: >>> diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c >>> index f9b0e9714d9..d7067989ad7 100644 >>> --- a/gcc/emit-rtl.c >>> +++ b/gcc/emit-rtl.c >>> @@ -947,6 +947,11 @@ validate_sub

Re: [PATCH] emit-rtl.c: Allow vector subreg of float vectors

2020-08-10 Thread Richard Sandiford
Andrew Stubbs writes: > On 06/08/2020 04:54, Richard Sandiford wrote: >>> diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c >>> index f9b0e9714d9..d7067989ad7 100644 >>> --- a/gcc/emit-rtl.c >>> +++ b/gcc/emit-rtl.c >>> @@ -947,6 +947,11 @@ validate_subreg (machine_mode omode, machine_mode >>> imode,

Re: [PATCH] emit-rtl.c: Allow vector subreg of float vectors

2020-08-07 Thread Andrew Stubbs
On 06/08/2020 04:54, Richard Sandiford wrote: diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index f9b0e9714d9..d7067989ad7 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -947,6 +947,11 @@ validate_subreg (machine_mode omode, machine_mode imode, else if (VECTOR_MODE_P (omode) &&

Re: [PATCH] emit-rtl.c: Allow vector subreg of float vectors

2020-08-05 Thread Richard Sandiford
Andrew Stubbs writes: > This patch is a prerequisite for some patches I have to add multiple > vector sizes on amdgcn. > > The problem is that validate_subreg rejects things like this: > >(subreg:V32SF (reg:V64SF) 0) > > These are commonly generated by the compiler. The integer equivalents >

[PATCH] emit-rtl.c: Allow vector subreg of float vectors

2020-08-05 Thread Andrew Stubbs
This patch is a prerequisite for some patches I have to add multiple vector sizes on amdgcn. The problem is that validate_subreg rejects things like this: (subreg:V32SF (reg:V64SF) 0) These are commonly generated by the compiler. The integer equivalents work fine. To be honest, I don't kn