[v4,09/10] This patch adds a guard for VNx1 vectors that are present in ports like riscv.

Message ID 20230417183701.2249183-10-collison@rivosinc.com
State Unresolved
Headers
Series RISC-V: Add autovec support |

Checks

Context Check Description
snail/gcc-patch-check warning Git am fail log

Commit Message

Michael Collison April 17, 2023, 6:37 p.m. UTC
  From: Kevin Lee <kevinl@rivosinc.com>

Kevin Lee <kevinl@rivosinc.com>
gcc/ChangeLog:

	* tree-vect-data-refs.cc (vect_grouped_store_supported): Add new
condition
---
 gcc/tree-vect-data-refs.cc | 2 ++
 1 file changed, 2 insertions(+)
  

Comments

Kito Cheng April 18, 2023, 2:26 p.m. UTC | #1
I would prefer drop this patch from this patch series since I believe
https://patchwork.ozlabs.org/project/gcc/patch/20230414014518.15458-1-juzhe.zhong@rivai.ai/
is the right fix for this issue.

On Tue, Apr 18, 2023 at 2:40 AM Michael Collison <collison@rivosinc.com> wrote:
>
> From: Kevin Lee <kevinl@rivosinc.com>
>
> Kevin Lee <kevinl@rivosinc.com>
> gcc/ChangeLog:
>
>         * tree-vect-data-refs.cc (vect_grouped_store_supported): Add new
> condition
> ---
>  gcc/tree-vect-data-refs.cc | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/gcc/tree-vect-data-refs.cc b/gcc/tree-vect-data-refs.cc
> index 8daf7bd7dd3..df393ba723d 100644
> --- a/gcc/tree-vect-data-refs.cc
> +++ b/gcc/tree-vect-data-refs.cc
> @@ -5399,6 +5399,8 @@ vect_grouped_store_supported (tree vectype, unsigned HOST_WIDE_INT count)
>           poly_uint64 nelt = GET_MODE_NUNITS (mode);
>
>           /* The encoding has 2 interleaved stepped patterns.  */
> +    if(!multiple_p (nelt, 2))
> +      return false;
>           vec_perm_builder sel (nelt, 2, 3);
>           sel.quick_grow (6);
>           for (i = 0; i < 3; i++)
> --
> 2.34.1
>
  
Michael Collison April 18, 2023, 6:10 p.m. UTC | #2
Thanks Kito I will look into this.


On 4/18/23 10:26, Kito Cheng wrote:
> I would prefer drop this patch from this patch series since I believe
> https://patchwork.ozlabs.org/project/gcc/patch/20230414014518.15458-1-juzhe.zhong@rivai.ai/
> is the right fix for this issue.
>
> On Tue, Apr 18, 2023 at 2:40 AM Michael Collison <collison@rivosinc.com> wrote:
>> From: Kevin Lee <kevinl@rivosinc.com>
>>
>> Kevin Lee <kevinl@rivosinc.com>
>> gcc/ChangeLog:
>>
>>          * tree-vect-data-refs.cc (vect_grouped_store_supported): Add new
>> condition
>> ---
>>   gcc/tree-vect-data-refs.cc | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/gcc/tree-vect-data-refs.cc b/gcc/tree-vect-data-refs.cc
>> index 8daf7bd7dd3..df393ba723d 100644
>> --- a/gcc/tree-vect-data-refs.cc
>> +++ b/gcc/tree-vect-data-refs.cc
>> @@ -5399,6 +5399,8 @@ vect_grouped_store_supported (tree vectype, unsigned HOST_WIDE_INT count)
>>            poly_uint64 nelt = GET_MODE_NUNITS (mode);
>>
>>            /* The encoding has 2 interleaved stepped patterns.  */
>> +    if(!multiple_p (nelt, 2))
>> +      return false;
>>            vec_perm_builder sel (nelt, 2, 3);
>>            sel.quick_grow (6);
>>            for (i = 0; i < 3; i++)
>> --
>> 2.34.1
>>
  

Patch

diff --git a/gcc/tree-vect-data-refs.cc b/gcc/tree-vect-data-refs.cc
index 8daf7bd7dd3..df393ba723d 100644
--- a/gcc/tree-vect-data-refs.cc
+++ b/gcc/tree-vect-data-refs.cc
@@ -5399,6 +5399,8 @@  vect_grouped_store_supported (tree vectype, unsigned HOST_WIDE_INT count)
 	  poly_uint64 nelt = GET_MODE_NUNITS (mode);
 
 	  /* The encoding has 2 interleaved stepped patterns.  */
+    if(!multiple_p (nelt, 2))
+      return false;
 	  vec_perm_builder sel (nelt, 2, 3);
 	  sel.quick_grow (6);
 	  for (i = 0; i < 3; i++)