[7/8] rs6000: vec_neg built-ins wrongly require POWER8

Message ID 16a48501c2e15d0a781ead8b44ca912dae90d717.1643390744.git.wschmidt@linux.ibm.com
State Committed
Commit d32a5f4b52aa1f845c4fb56d4e849d4386299100
Headers
Series rs6000: Built-in function cleanups and bug fixes |

Commit Message

Bill Schmidt Jan. 28, 2022, 5:50 p.m. UTC
  As the subject states.  Fixing this is accomplished by moving the built-ins
to the correct stanzas, [altivec] and [vsx].

Bootstrapped and tested on powerpc64le-linux-gnu with no regressions.
Is this okay for trunk?

Thanks,
Bill


2022-01-27  Bill Schmidt  <wschmidt@linux.ibm.com>

gcc/
	* config/rs6000/rs6000-builtin.def (NEG_V16QI): Move to [altivec]
	stanza.
	(NEG_V4SF): Likewise.
	(NEG_V4SI): Likewise.
	(NEG_V8HI): Likewise.
	(NEG_V2DF): Move to [vsx] stanza.
	(NEG_V2DI): Likewise.
---
 gcc/config/rs6000/rs6000-builtins.def | 36 +++++++++++++--------------
 1 file changed, 18 insertions(+), 18 deletions(-)
  

Comments

Li, Pan2 via Gcc-patches Feb. 7, 2022, 3:48 p.m. UTC | #1
Hi Segher,

Thanks for all the reviews for this series!  I'd like to gently ping the last two patches.

BR,
Bill

On 1/28/22 11:50 AM, Bill Schmidt via Gcc-patches wrote:
> As the subject states.  Fixing this is accomplished by moving the built-ins
> to the correct stanzas, [altivec] and [vsx].
>
> Bootstrapped and tested on powerpc64le-linux-gnu with no regressions.
> Is this okay for trunk?
>
> Thanks,
> Bill
>
>
> 2022-01-27  Bill Schmidt  <wschmidt@linux.ibm.com>
>
> gcc/
> 	* config/rs6000/rs6000-builtin.def (NEG_V16QI): Move to [altivec]
> 	stanza.
> 	(NEG_V4SF): Likewise.
> 	(NEG_V4SI): Likewise.
> 	(NEG_V8HI): Likewise.
> 	(NEG_V2DF): Move to [vsx] stanza.
> 	(NEG_V2DI): Likewise.
> ---
>  gcc/config/rs6000/rs6000-builtins.def | 36 +++++++++++++--------------
>  1 file changed, 18 insertions(+), 18 deletions(-)
>
> diff --git a/gcc/config/rs6000/rs6000-builtins.def b/gcc/config/rs6000/rs6000-builtins.def
> index 2bb997a5279..c8f0cf332eb 100644
> --- a/gcc/config/rs6000/rs6000-builtins.def
> +++ b/gcc/config/rs6000/rs6000-builtins.def
> @@ -410,6 +410,18 @@
>    const vss __builtin_altivec_nabs_v8hi (vss);
>      NABS_V8HI nabsv8hi2 {}
>
> +  const vsc __builtin_altivec_neg_v16qi (vsc);
> +    NEG_V16QI negv16qi2 {}
> +
> +  const vf __builtin_altivec_neg_v4sf (vf);
> +    NEG_V4SF negv4sf2 {}
> +
> +  const vsi __builtin_altivec_neg_v4si (vsi);
> +    NEG_V4SI negv4si2 {}
> +
> +  const vss __builtin_altivec_neg_v8hi (vss);
> +    NEG_V8HI negv8hi2 {}
> +
>    void __builtin_altivec_stvebx (vsc, signed long, void *);
>      STVEBX altivec_stvebx {stvec}
>
> @@ -1175,6 +1187,12 @@
>    const vsll __builtin_altivec_nabs_v2di (vsll);
>      NABS_V2DI nabsv2di2 {}
>
> +  const vd __builtin_altivec_neg_v2df (vd);
> +    NEG_V2DF negv2df2 {}
> +
> +  const vsll __builtin_altivec_neg_v2di (vsll);
> +    NEG_V2DI negv2di2 {}
> +
>    void __builtin_altivec_stvx_v2df (vd, signed long, void *);
>      STVX_V2DF altivec_stvx_v2df {stvec}
>
> @@ -2118,24 +2136,6 @@
>    const vus __builtin_altivec_nand_v8hi_uns (vus, vus);
>      NAND_V8HI_UNS nandv8hi3 {}
>
> -  const vsc __builtin_altivec_neg_v16qi (vsc);
> -    NEG_V16QI negv16qi2 {}
> -
> -  const vd __builtin_altivec_neg_v2df (vd);
> -    NEG_V2DF negv2df2 {}
> -
> -  const vsll __builtin_altivec_neg_v2di (vsll);
> -    NEG_V2DI negv2di2 {}
> -
> -  const vf __builtin_altivec_neg_v4sf (vf);
> -    NEG_V4SF negv4sf2 {}
> -
> -  const vsi __builtin_altivec_neg_v4si (vsi);
> -    NEG_V4SI negv4si2 {}
> -
> -  const vss __builtin_altivec_neg_v8hi (vss);
> -    NEG_V8HI negv8hi2 {}
> -
>    const vsc __builtin_altivec_orc_v16qi (vsc, vsc);
>      ORC_V16QI orcv16qi3 {}
>
  
Segher Boessenkool March 30, 2022, 6:04 p.m. UTC | #2
On Fri, Jan 28, 2022 at 11:50:25AM -0600, Bill Schmidt wrote:
> As the subject states.  Fixing this is accomplished by moving the built-ins
> to the correct stanzas, [altivec] and [vsx].
> 
> Bootstrapped and tested on powerpc64le-linux-gnu with no regressions.
> Is this okay for trunk?

Okay for trunk.  Thanks!

I'll apply it myself :-)


Segher


> 2022-01-27  Bill Schmidt  <wschmidt@linux.ibm.com>
> 
> gcc/
> 	* config/rs6000/rs6000-builtin.def (NEG_V16QI): Move to [altivec]
> 	stanza.
> 	(NEG_V4SF): Likewise.
> 	(NEG_V4SI): Likewise.
> 	(NEG_V8HI): Likewise.
> 	(NEG_V2DF): Move to [vsx] stanza.
> 	(NEG_V2DI): Likewise.
  

Patch

diff --git a/gcc/config/rs6000/rs6000-builtins.def b/gcc/config/rs6000/rs6000-builtins.def
index 2bb997a5279..c8f0cf332eb 100644
--- a/gcc/config/rs6000/rs6000-builtins.def
+++ b/gcc/config/rs6000/rs6000-builtins.def
@@ -410,6 +410,18 @@ 
   const vss __builtin_altivec_nabs_v8hi (vss);
     NABS_V8HI nabsv8hi2 {}
 
+  const vsc __builtin_altivec_neg_v16qi (vsc);
+    NEG_V16QI negv16qi2 {}
+
+  const vf __builtin_altivec_neg_v4sf (vf);
+    NEG_V4SF negv4sf2 {}
+
+  const vsi __builtin_altivec_neg_v4si (vsi);
+    NEG_V4SI negv4si2 {}
+
+  const vss __builtin_altivec_neg_v8hi (vss);
+    NEG_V8HI negv8hi2 {}
+
   void __builtin_altivec_stvebx (vsc, signed long, void *);
     STVEBX altivec_stvebx {stvec}
 
@@ -1175,6 +1187,12 @@ 
   const vsll __builtin_altivec_nabs_v2di (vsll);
     NABS_V2DI nabsv2di2 {}
 
+  const vd __builtin_altivec_neg_v2df (vd);
+    NEG_V2DF negv2df2 {}
+
+  const vsll __builtin_altivec_neg_v2di (vsll);
+    NEG_V2DI negv2di2 {}
+
   void __builtin_altivec_stvx_v2df (vd, signed long, void *);
     STVX_V2DF altivec_stvx_v2df {stvec}
 
@@ -2118,24 +2136,6 @@ 
   const vus __builtin_altivec_nand_v8hi_uns (vus, vus);
     NAND_V8HI_UNS nandv8hi3 {}
 
-  const vsc __builtin_altivec_neg_v16qi (vsc);
-    NEG_V16QI negv16qi2 {}
-
-  const vd __builtin_altivec_neg_v2df (vd);
-    NEG_V2DF negv2df2 {}
-
-  const vsll __builtin_altivec_neg_v2di (vsll);
-    NEG_V2DI negv2di2 {}
-
-  const vf __builtin_altivec_neg_v4sf (vf);
-    NEG_V4SF negv4sf2 {}
-
-  const vsi __builtin_altivec_neg_v4si (vsi);
-    NEG_V4SI negv4si2 {}
-
-  const vss __builtin_altivec_neg_v8hi (vss);
-    NEG_V8HI negv8hi2 {}
-
   const vsc __builtin_altivec_orc_v16qi (vsc, vsc);
     ORC_V16QI orcv16qi3 {}