s390: Fix vec_scatter_element for vectors of floats

Message ID 20231114114454.557933-2-stefansf@linux.ibm.com
State Accepted
Headers
Series s390: Fix vec_scatter_element for vectors of floats |

Checks

Context Check Description
snail/gcc-patch-check success Github commit url

Commit Message

Stefan Schulze Frielinghaus Nov. 14, 2023, 11:44 a.m. UTC
  The offset for vec_scatter_element of floats should be a vector of type
UV4SI instead of V4SF.  Note, this is an incompatibility change.

Bootstrapped on s390.  Ok for mainline?

gcc/ChangeLog:

	* config/s390/s390-builtin-types.def: Add/remove types.
	* config/s390/s390-builtins.def (s390_vec_scatter_element_flt):
	The type for the offset should be UV4SI instead of V4SF.
---
 gcc/config/s390/s390-builtin-types.def | 2 +-
 gcc/config/s390/s390-builtins.def      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
  

Comments

Andreas Krebbel Nov. 14, 2023, 2:58 p.m. UTC | #1
On 11/14/23 12:44, Stefan Schulze Frielinghaus wrote:
> The offset for vec_scatter_element of floats should be a vector of type
> UV4SI instead of V4SF.  Note, this is an incompatibility change.
> 
> Bootstrapped on s390.  Ok for mainline?
> 
> gcc/ChangeLog:
> 
> 	* config/s390/s390-builtin-types.def: Add/remove types.
> 	* config/s390/s390-builtins.def (s390_vec_scatter_element_flt):
> 	The type for the offset should be UV4SI instead of V4SF.

Ok, Thanks!

Andreas

> ---
>  gcc/config/s390/s390-builtin-types.def | 2 +-
>  gcc/config/s390/s390-builtins.def      | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/gcc/config/s390/s390-builtin-types.def b/gcc/config/s390/s390-builtin-types.def
> index 3d8b30cdcc8..22ee348dbbb 100644
> --- a/gcc/config/s390/s390-builtin-types.def
> +++ b/gcc/config/s390/s390-builtin-types.def
> @@ -856,7 +856,7 @@ DEF_OV_TYPE (BT_OV_VOID_V2DI_LONG_LONGLONGPTR, BT_VOID, BT_V2DI, BT_LONG, BT_LON
>  DEF_OV_TYPE (BT_OV_VOID_V2DI_UV2DI_LONGLONGPTR_ULONGLONG, BT_VOID, BT_V2DI, BT_UV2DI, BT_LONGLONGPTR, BT_ULONGLONG)
>  DEF_OV_TYPE (BT_OV_VOID_V4SF_FLTPTR_UINT, BT_VOID, BT_V4SF, BT_FLTPTR, BT_UINT)
>  DEF_OV_TYPE (BT_OV_VOID_V4SF_LONG_FLTPTR, BT_VOID, BT_V4SF, BT_LONG, BT_FLTPTR)
> -DEF_OV_TYPE (BT_OV_VOID_V4SF_V4SF_FLTPTR_ULONGLONG, BT_VOID, BT_V4SF, BT_V4SF, BT_FLTPTR, BT_ULONGLONG)
> +DEF_OV_TYPE (BT_OV_VOID_V4SF_UV4SI_FLTPTR_ULONGLONG, BT_VOID, BT_V4SF, BT_UV4SI, BT_FLTPTR, BT_ULONGLONG)
>  DEF_OV_TYPE (BT_OV_VOID_V4SI_INTPTR_UINT, BT_VOID, BT_V4SI, BT_INTPTR, BT_UINT)
>  DEF_OV_TYPE (BT_OV_VOID_V4SI_LONG_INTPTR, BT_VOID, BT_V4SI, BT_LONG, BT_INTPTR)
>  DEF_OV_TYPE (BT_OV_VOID_V4SI_UV4SI_INTPTR_ULONGLONG, BT_VOID, BT_V4SI, BT_UV4SI, BT_INTPTR, BT_ULONGLONG)
> diff --git a/gcc/config/s390/s390-builtins.def b/gcc/config/s390/s390-builtins.def
> index 964d86c74a0..b59fa09fe07 100644
> --- a/gcc/config/s390/s390-builtins.def
> +++ b/gcc/config/s390/s390-builtins.def
> @@ -708,7 +708,7 @@ OB_DEF_VAR (s390_vec_scatter_element_u32,s390_vscef,        0,
>  OB_DEF_VAR (s390_vec_scatter_element_s64,s390_vsceg,        0,                  O4_U1,              BT_OV_VOID_V2DI_UV2DI_LONGLONGPTR_ULONGLONG)
>  OB_DEF_VAR (s390_vec_scatter_element_b64,s390_vsceg,        0,                  O4_U1,              BT_OV_VOID_BV2DI_UV2DI_ULONGLONGPTR_ULONGLONG)
>  OB_DEF_VAR (s390_vec_scatter_element_u64,s390_vsceg,        0,                  O4_U1,              BT_OV_VOID_UV2DI_UV2DI_ULONGLONGPTR_ULONGLONG)
> -OB_DEF_VAR (s390_vec_scatter_element_flt,s390_vscef,        B_VXE,              O4_U2,              BT_OV_VOID_V4SF_V4SF_FLTPTR_ULONGLONG)
> +OB_DEF_VAR (s390_vec_scatter_element_flt,s390_vscef,        B_VXE,              O4_U2,              BT_OV_VOID_V4SF_UV4SI_FLTPTR_ULONGLONG)
>  OB_DEF_VAR (s390_vec_scatter_element_dbl,s390_vsceg,        0,                  O4_U1,              BT_OV_VOID_V2DF_UV2DI_DBLPTR_ULONGLONG)
>  
>  B_DEF      (s390_vscef,                 vec_scatter_elementv4si,0,              B_VX,               O4_U2,              BT_FN_VOID_UV4SI_UV4SI_UINTPTR_ULONGLONG)
  

Patch

diff --git a/gcc/config/s390/s390-builtin-types.def b/gcc/config/s390/s390-builtin-types.def
index 3d8b30cdcc8..22ee348dbbb 100644
--- a/gcc/config/s390/s390-builtin-types.def
+++ b/gcc/config/s390/s390-builtin-types.def
@@ -856,7 +856,7 @@  DEF_OV_TYPE (BT_OV_VOID_V2DI_LONG_LONGLONGPTR, BT_VOID, BT_V2DI, BT_LONG, BT_LON
 DEF_OV_TYPE (BT_OV_VOID_V2DI_UV2DI_LONGLONGPTR_ULONGLONG, BT_VOID, BT_V2DI, BT_UV2DI, BT_LONGLONGPTR, BT_ULONGLONG)
 DEF_OV_TYPE (BT_OV_VOID_V4SF_FLTPTR_UINT, BT_VOID, BT_V4SF, BT_FLTPTR, BT_UINT)
 DEF_OV_TYPE (BT_OV_VOID_V4SF_LONG_FLTPTR, BT_VOID, BT_V4SF, BT_LONG, BT_FLTPTR)
-DEF_OV_TYPE (BT_OV_VOID_V4SF_V4SF_FLTPTR_ULONGLONG, BT_VOID, BT_V4SF, BT_V4SF, BT_FLTPTR, BT_ULONGLONG)
+DEF_OV_TYPE (BT_OV_VOID_V4SF_UV4SI_FLTPTR_ULONGLONG, BT_VOID, BT_V4SF, BT_UV4SI, BT_FLTPTR, BT_ULONGLONG)
 DEF_OV_TYPE (BT_OV_VOID_V4SI_INTPTR_UINT, BT_VOID, BT_V4SI, BT_INTPTR, BT_UINT)
 DEF_OV_TYPE (BT_OV_VOID_V4SI_LONG_INTPTR, BT_VOID, BT_V4SI, BT_LONG, BT_INTPTR)
 DEF_OV_TYPE (BT_OV_VOID_V4SI_UV4SI_INTPTR_ULONGLONG, BT_VOID, BT_V4SI, BT_UV4SI, BT_INTPTR, BT_ULONGLONG)
diff --git a/gcc/config/s390/s390-builtins.def b/gcc/config/s390/s390-builtins.def
index 964d86c74a0..b59fa09fe07 100644
--- a/gcc/config/s390/s390-builtins.def
+++ b/gcc/config/s390/s390-builtins.def
@@ -708,7 +708,7 @@  OB_DEF_VAR (s390_vec_scatter_element_u32,s390_vscef,        0,
 OB_DEF_VAR (s390_vec_scatter_element_s64,s390_vsceg,        0,                  O4_U1,              BT_OV_VOID_V2DI_UV2DI_LONGLONGPTR_ULONGLONG)
 OB_DEF_VAR (s390_vec_scatter_element_b64,s390_vsceg,        0,                  O4_U1,              BT_OV_VOID_BV2DI_UV2DI_ULONGLONGPTR_ULONGLONG)
 OB_DEF_VAR (s390_vec_scatter_element_u64,s390_vsceg,        0,                  O4_U1,              BT_OV_VOID_UV2DI_UV2DI_ULONGLONGPTR_ULONGLONG)
-OB_DEF_VAR (s390_vec_scatter_element_flt,s390_vscef,        B_VXE,              O4_U2,              BT_OV_VOID_V4SF_V4SF_FLTPTR_ULONGLONG)
+OB_DEF_VAR (s390_vec_scatter_element_flt,s390_vscef,        B_VXE,              O4_U2,              BT_OV_VOID_V4SF_UV4SI_FLTPTR_ULONGLONG)
 OB_DEF_VAR (s390_vec_scatter_element_dbl,s390_vsceg,        0,                  O4_U1,              BT_OV_VOID_V2DF_UV2DI_DBLPTR_ULONGLONG)
 
 B_DEF      (s390_vscef,                 vec_scatter_elementv4si,0,              B_VX,               O4_U2,              BT_FN_VOID_UV4SI_UV4SI_UINTPTR_ULONGLONG)