[rs6000] Begin deprecation of -maltivec=be

Message ID 30d19d80-39d0-1727-3833-986da1651a7b@linux.vnet.ibm.com
State New
Headers show
Series
  • [rs6000] Begin deprecation of -maltivec=be
Related show

Commit Message

Kelvin Nilsen Feb. 13, 2018, 10:11 p.m.
PR 78303 was recently marked RESOLVED, WONTFIX.  The resolution was to
deprecate the troublesome command-line option.

This patch begins the process of deprecation by issuing a warning
message when this command-line option is specified.  The patch has
bootstrapped and tested without regressions on
powerpc64le-unknown-linux.  Is this ok for trunk?

gcc/ChangeLog:

2018-02-13  Kelvin Nilsen  <kelvin@gcc.gnu.org>

	* config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
	warning message if user requests -maltivec=be.

gcc/testsuite/ChangeLog:

2018-02-13  Kelvin Nilsen  <kelvin@gcc.gnu.org>

	* gcc.dg/vmx/extract-be-order.c: Disable -maltivec=be warning so
	this test case still works ok.
	* gcc.dg/vmx/extract-vsx-be-order.c: Likewise.
	* gcc.dg/vmx/insert-be-order.c: Likewise.
	* gcc.dg/vmx/insert-vsx-be-order.c: Likewise.
	* gcc.dg/vmx/ld-be-order.c: Likewise.
	* gcc.dg/vmx/ld-vsx-be-order.c: Likewise.
	* gcc.dg/vmx/lde-be-order.c: Likewise.
	* gcc.dg/vmx/ldl-be-order.c: Likewise.
	* gcc.dg/vmx/ldl-vsx-be-order.c: Likewise.
	* gcc.dg/vmx/merge-be-order.c: Likewise.
	* gcc.dg/vmx/merge-vsx-be-order.c: Likewise.
	* gcc.dg/vmx/mult-even-odd-be-order.c: Likewise.
	* gcc.dg/vmx/pack-be-order.c: Likewise.
	* gcc.dg/vmx/perm-be-order.c: Likewise.
	* gcc.dg/vmx/splat-be-order.c: Likewise.
	* gcc.dg/vmx/splat-vsx-be-order.c: Likewise.
	* gcc.dg/vmx/st-be-order.c: Likewise.
	* gcc.dg/vmx/st-vsx-be-order.c: Likewise.
	* gcc.dg/vmx/ste-be-order.c: Likewise.
	* gcc.dg/vmx/stl-be-order.c: Likewise.
	* gcc.dg/vmx/stl-vsx-be-order.c: Likewise.
	* gcc.dg/vmx/sum2s-be-order.c: Likewise.
	* gcc.dg/vmx/unpack-be-order.c: Likewise.
	* gcc.dg/vmx/vsums-be-order.c: Likewise.
	* gcc.target/powerpc/vec-setup-be-long.c: Likewise.

Comments

Segher Boessenkool Feb. 13, 2018, 11:33 p.m. | #1
On Tue, Feb 13, 2018 at 04:11:36PM -0600, Kelvin Nilsen wrote:
> PR 78303 was recently marked RESOLVED, WONTFIX.  The resolution was to
> deprecate the troublesome command-line option.
> 
> This patch begins the process of deprecation by issuing a warning
> message when this command-line option is specified.  The patch has
> bootstrapped and tested without regressions on
> powerpc64le-unknown-linux.  Is this ok for trunk?

Is -w appropriate for all these testcases, i.e. would we want to see
any other warnings that are generated for them?  Or will we remember
to remove -w when we remove -maltivec=be :-)

Will you write a wwwdocs patch as well, please?  Is the plan to remove
this in GCC 9 already?

> --- gcc/config/rs6000/rs6000.c	(revision 257395)
> +++ gcc/config/rs6000/rs6000.c	(working copy)
> @@ -4028,6 +4028,13 @@ rs6000_option_override_internal (bool global_init_
>    if (global_init_p)
>      rs6000_isa_flags_explicit = global_options_set.x_rs6000_isa_flags;
>  
> +  /* We plan to deprecate the -maltivec=be option.  For now, just
> +     issue a warning message.  */
> +  if (global_init_p
> +      && (rs6000_altivec_element_order == 2))

Please remove the useless parens.

Otherwise okay for trunk.  Thanks!


Segher

Patch

Index: gcc/config/rs6000/rs6000.c
===================================================================
--- gcc/config/rs6000/rs6000.c	(revision 257395)
+++ gcc/config/rs6000/rs6000.c	(working copy)
@@ -4028,6 +4028,13 @@  rs6000_option_override_internal (bool global_init_
   if (global_init_p)
     rs6000_isa_flags_explicit = global_options_set.x_rs6000_isa_flags;
 
+  /* We plan to deprecate the -maltivec=be option.  For now, just
+     issue a warning message.  */
+  if (global_init_p
+      && (rs6000_altivec_element_order == 2))
+    warning (0, "%qs command-line option is deprecated",
+	     "-maltivec=be");
+
   /* On 64-bit Darwin, power alignment is ABI-incompatible with some C
      library functions, so warn about it. The flag may be useful for
      performance studies from time to time though, so don't disable it
Index: gcc/testsuite/gcc.dg/vmx/extract-be-order.c
===================================================================
--- gcc/testsuite/gcc.dg/vmx/extract-be-order.c	(revision 257395)
+++ gcc/testsuite/gcc.dg/vmx/extract-be-order.c	(working copy)
@@ -1,4 +1,4 @@ 
-/* { dg-options "-maltivec=be -mabi=altivec -std=gnu99 -mno-vsx" } */
+/* { dg-options "-maltivec=be -mabi=altivec -std=gnu99 -mno-vsx -w" } */
 
 #include "harness.h"
 
Index: gcc/testsuite/gcc.dg/vmx/extract-vsx-be-order.c
===================================================================
--- gcc/testsuite/gcc.dg/vmx/extract-vsx-be-order.c	(revision 257395)
+++ gcc/testsuite/gcc.dg/vmx/extract-vsx-be-order.c	(working copy)
@@ -1,6 +1,6 @@ 
 /* { dg-skip-if "" { powerpc*-*-darwin* } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
-/* { dg-options "-maltivec=be -mabi=altivec -std=gnu99 -mvsx" } */
+/* { dg-options "-maltivec=be -mabi=altivec -std=gnu99 -mvsx -w" } */
 
 #include "harness.h"
 
Index: gcc/testsuite/gcc.dg/vmx/insert-be-order.c
===================================================================
--- gcc/testsuite/gcc.dg/vmx/insert-be-order.c	(revision 257395)
+++ gcc/testsuite/gcc.dg/vmx/insert-be-order.c	(working copy)
@@ -1,4 +1,4 @@ 
-/* { dg-options "-maltivec=be -mabi=altivec -std=gnu99 -mno-vsx" } */
+/* { dg-options "-w -maltivec=be -mabi=altivec -std=gnu99 -mno-vsx" } */
 
 #include "harness.h"
 
Index: gcc/testsuite/gcc.dg/vmx/insert-vsx-be-order.c
===================================================================
--- gcc/testsuite/gcc.dg/vmx/insert-vsx-be-order.c	(revision 257395)
+++ gcc/testsuite/gcc.dg/vmx/insert-vsx-be-order.c	(working copy)
@@ -1,6 +1,6 @@ 
 /* { dg-skip-if "" { powerpc*-*-darwin* } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
-/* { dg-options "-maltivec=be -mabi=altivec -std=gnu99 -mvsx" } */
+/* { dg-options "-w -maltivec=be -mabi=altivec -std=gnu99 -mvsx" } */
 
 #include "harness.h"
 
Index: gcc/testsuite/gcc.dg/vmx/ld-be-order.c
===================================================================
--- gcc/testsuite/gcc.dg/vmx/ld-be-order.c	(revision 257395)
+++ gcc/testsuite/gcc.dg/vmx/ld-be-order.c	(working copy)
@@ -1,4 +1,4 @@ 
-/* { dg-options "-maltivec=be -mabi=altivec -std=gnu99 -mno-vsx" } */
+/* { dg-options "-w -maltivec=be -mabi=altivec -std=gnu99 -mno-vsx" } */
 
 #include "harness.h"
 
Index: gcc/testsuite/gcc.dg/vmx/ld-vsx-be-order.c
===================================================================
--- gcc/testsuite/gcc.dg/vmx/ld-vsx-be-order.c	(revision 257395)
+++ gcc/testsuite/gcc.dg/vmx/ld-vsx-be-order.c	(working copy)
@@ -1,6 +1,6 @@ 
 /* { dg-skip-if "" { powerpc*-*-darwin* } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
-/* { dg-options "-maltivec=be -mabi=altivec -std=gnu99 -mvsx" } */
+/* { dg-options "-w -maltivec=be -mabi=altivec -std=gnu99 -mvsx" } */
 
 #include "harness.h"
 
Index: gcc/testsuite/gcc.dg/vmx/lde-be-order.c
===================================================================
--- gcc/testsuite/gcc.dg/vmx/lde-be-order.c	(revision 257395)
+++ gcc/testsuite/gcc.dg/vmx/lde-be-order.c	(working copy)
@@ -1,4 +1,4 @@ 
-/* { dg-options "-maltivec=be -mabi=altivec -std=gnu99 -mno-vsx" } */
+/* { dg-options "-w -maltivec=be -mabi=altivec -std=gnu99 -mno-vsx" } */
 
 #include "harness.h"
 
Index: gcc/testsuite/gcc.dg/vmx/ldl-be-order.c
===================================================================
--- gcc/testsuite/gcc.dg/vmx/ldl-be-order.c	(revision 257395)
+++ gcc/testsuite/gcc.dg/vmx/ldl-be-order.c	(working copy)
@@ -1,4 +1,4 @@ 
-/* { dg-options "-maltivec=be -mabi=altivec -std=gnu99 -mno-vsx" } */
+/* { dg-options "-w -maltivec=be -mabi=altivec -std=gnu99 -mno-vsx" } */
 
 #include "harness.h"
 
Index: gcc/testsuite/gcc.dg/vmx/ldl-vsx-be-order.c
===================================================================
--- gcc/testsuite/gcc.dg/vmx/ldl-vsx-be-order.c	(revision 257395)
+++ gcc/testsuite/gcc.dg/vmx/ldl-vsx-be-order.c	(working copy)
@@ -1,6 +1,6 @@ 
 /* { dg-skip-if "" { powerpc*-*-darwin* } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
-/* { dg-options "-maltivec=be -mabi=altivec -std=gnu99 -mvsx" } */
+/* { dg-options "-w -maltivec=be -mabi=altivec -std=gnu99 -mvsx" } */
 
 #include "harness.h"
 
Index: gcc/testsuite/gcc.dg/vmx/merge-be-order.c
===================================================================
--- gcc/testsuite/gcc.dg/vmx/merge-be-order.c	(revision 257395)
+++ gcc/testsuite/gcc.dg/vmx/merge-be-order.c	(working copy)
@@ -1,4 +1,4 @@ 
-/* { dg-options "-maltivec=be -mabi=altivec -std=gnu99 -mno-vsx" } */
+/* { dg-options "-w -maltivec=be -mabi=altivec -std=gnu99 -mno-vsx" } */
 
 #include "harness.h"
 
Index: gcc/testsuite/gcc.dg/vmx/merge-vsx-be-order.c
===================================================================
--- gcc/testsuite/gcc.dg/vmx/merge-vsx-be-order.c	(revision 257395)
+++ gcc/testsuite/gcc.dg/vmx/merge-vsx-be-order.c	(working copy)
@@ -1,6 +1,6 @@ 
 /* { dg-skip-if "" { powerpc*-*-darwin* } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
-/* { dg-options "-maltivec=be -mabi=altivec -std=gnu99 -mvsx" } */
+/* { dg-options "-w -maltivec=be -mabi=altivec -std=gnu99 -mvsx" } */
 
 #include "harness.h"
 
Index: gcc/testsuite/gcc.dg/vmx/mult-even-odd-be-order.c
===================================================================
--- gcc/testsuite/gcc.dg/vmx/mult-even-odd-be-order.c	(revision 257395)
+++ gcc/testsuite/gcc.dg/vmx/mult-even-odd-be-order.c	(working copy)
@@ -1,4 +1,4 @@ 
-/* { dg-options "-maltivec=be -mabi=altivec -std=gnu99 -mno-vsx" } */
+/* { dg-options "-w -maltivec=be -mabi=altivec -std=gnu99 -mno-vsx" } */
 
 #include "harness.h"
 
Index: gcc/testsuite/gcc.dg/vmx/pack-be-order.c
===================================================================
--- gcc/testsuite/gcc.dg/vmx/pack-be-order.c	(revision 257395)
+++ gcc/testsuite/gcc.dg/vmx/pack-be-order.c	(working copy)
@@ -1,4 +1,4 @@ 
-/* { dg-options "-maltivec=be -mabi=altivec -std=gnu99 -mno-vsx" } */
+/* { dg-options "-w -maltivec=be -mabi=altivec -std=gnu99 -mno-vsx" } */
 
 #include "harness.h"
 
Index: gcc/testsuite/gcc.dg/vmx/perm-be-order.c
===================================================================
--- gcc/testsuite/gcc.dg/vmx/perm-be-order.c	(revision 257395)
+++ gcc/testsuite/gcc.dg/vmx/perm-be-order.c	(working copy)
@@ -1,4 +1,4 @@ 
-/* { dg-options "-maltivec=be -mabi=altivec -std=gnu99 -mno-vsx" } */
+/* { dg-options "-w -maltivec=be -mabi=altivec -std=gnu99 -mno-vsx" } */
 
 #include "harness.h"
 
Index: gcc/testsuite/gcc.dg/vmx/splat-be-order.c
===================================================================
--- gcc/testsuite/gcc.dg/vmx/splat-be-order.c	(revision 257395)
+++ gcc/testsuite/gcc.dg/vmx/splat-be-order.c	(working copy)
@@ -1,4 +1,4 @@ 
-/* { dg-options "-maltivec=be -mabi=altivec -std=gnu99 -mno-vsx" } */
+/* { dg-options "-w -maltivec=be -mabi=altivec -std=gnu99 -mno-vsx" } */
 
 #include "harness.h"
 
Index: gcc/testsuite/gcc.dg/vmx/splat-vsx-be-order.c
===================================================================
--- gcc/testsuite/gcc.dg/vmx/splat-vsx-be-order.c	(revision 257395)
+++ gcc/testsuite/gcc.dg/vmx/splat-vsx-be-order.c	(working copy)
@@ -1,6 +1,6 @@ 
 /* { dg-skip-if "" { powerpc*-*-darwin* } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
-/* { dg-options "-maltivec=be -mabi=altivec -std=gnu99 -mvsx" } */
+/* { dg-options "-w -maltivec=be -mabi=altivec -std=gnu99 -mvsx" } */
 
 #include "harness.h"
 
Index: gcc/testsuite/gcc.dg/vmx/st-be-order.c
===================================================================
--- gcc/testsuite/gcc.dg/vmx/st-be-order.c	(revision 257395)
+++ gcc/testsuite/gcc.dg/vmx/st-be-order.c	(working copy)
@@ -1,4 +1,4 @@ 
-/* { dg-options "-maltivec=be -mabi=altivec -std=gnu99 -mno-vsx" } */
+/* { dg-options "-w -maltivec=be -mabi=altivec -std=gnu99 -mno-vsx" } */
 
 #include "harness.h"
 
Index: gcc/testsuite/gcc.dg/vmx/st-vsx-be-order.c
===================================================================
--- gcc/testsuite/gcc.dg/vmx/st-vsx-be-order.c	(revision 257395)
+++ gcc/testsuite/gcc.dg/vmx/st-vsx-be-order.c	(working copy)
@@ -1,6 +1,6 @@ 
 /* { dg-skip-if "" { powerpc*-*-darwin* } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
-/* { dg-options "-maltivec=be -mabi=altivec -std=gnu99 -mvsx" } */
+/* { dg-options "-w -maltivec=be -mabi=altivec -std=gnu99 -mvsx" } */
 
 #include "harness.h"
 
Index: gcc/testsuite/gcc.dg/vmx/ste-be-order.c
===================================================================
--- gcc/testsuite/gcc.dg/vmx/ste-be-order.c	(revision 257395)
+++ gcc/testsuite/gcc.dg/vmx/ste-be-order.c	(working copy)
@@ -1,4 +1,4 @@ 
-/* { dg-options "-maltivec=be -mabi=altivec -std=gnu99 -mno-vsx" } */
+/* { dg-options "-w -maltivec=be -mabi=altivec -std=gnu99 -mno-vsx" } */
 
 #include "harness.h"
 
Index: gcc/testsuite/gcc.dg/vmx/stl-be-order.c
===================================================================
--- gcc/testsuite/gcc.dg/vmx/stl-be-order.c	(revision 257395)
+++ gcc/testsuite/gcc.dg/vmx/stl-be-order.c	(working copy)
@@ -1,4 +1,4 @@ 
-/* { dg-options "-maltivec=be -mabi=altivec -std=gnu99 -mno-vsx" } */
+/* { dg-options "-w -maltivec=be -mabi=altivec -std=gnu99 -mno-vsx" } */
 
 #include "harness.h"
 
Index: gcc/testsuite/gcc.dg/vmx/stl-vsx-be-order.c
===================================================================
--- gcc/testsuite/gcc.dg/vmx/stl-vsx-be-order.c	(revision 257395)
+++ gcc/testsuite/gcc.dg/vmx/stl-vsx-be-order.c	(working copy)
@@ -1,6 +1,6 @@ 
 /* { dg-skip-if "" { powerpc*-*-darwin* } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
-/* { dg-options "-maltivec=be -mabi=altivec -std=gnu99 -mvsx" } */
+/* { dg-options "-w -maltivec=be -mabi=altivec -std=gnu99 -mvsx" } */
 
 #include "harness.h"
 
Index: gcc/testsuite/gcc.dg/vmx/sum2s-be-order.c
===================================================================
--- gcc/testsuite/gcc.dg/vmx/sum2s-be-order.c	(revision 257395)
+++ gcc/testsuite/gcc.dg/vmx/sum2s-be-order.c	(working copy)
@@ -1,4 +1,4 @@ 
-/* { dg-options "-maltivec=be -mabi=altivec -std=gnu99 -mno-vsx" } */
+/* { dg-options "-w -maltivec=be -mabi=altivec -std=gnu99 -mno-vsx" } */
 
 #include "harness.h"
 
Index: gcc/testsuite/gcc.dg/vmx/unpack-be-order.c
===================================================================
--- gcc/testsuite/gcc.dg/vmx/unpack-be-order.c	(revision 257395)
+++ gcc/testsuite/gcc.dg/vmx/unpack-be-order.c	(working copy)
@@ -1,4 +1,4 @@ 
-/* { dg-options "-maltivec=be -mabi=altivec -std=gnu99 -mno-vsx -Wno-shift-overflow" } */
+/* { dg-options "-w -maltivec=be -mabi=altivec -std=gnu99 -mno-vsx -Wno-shift-overflow" } */
 
 #include "harness.h"
 
Index: gcc/testsuite/gcc.dg/vmx/vsums-be-order.c
===================================================================
--- gcc/testsuite/gcc.dg/vmx/vsums-be-order.c	(revision 257395)
+++ gcc/testsuite/gcc.dg/vmx/vsums-be-order.c	(working copy)
@@ -1,4 +1,4 @@ 
-/* { dg-options "-maltivec=be -mabi=altivec -std=gnu99 -mno-vsx" } */
+/* { dg-options "-w -maltivec=be -mabi=altivec -std=gnu99 -mno-vsx" } */
 
 #include "harness.h"
 
Index: gcc/testsuite/gcc.target/powerpc/vec-setup-be-long.c
===================================================================
--- gcc/testsuite/gcc.target/powerpc/vec-setup-be-long.c	(revision 257395)
+++ gcc/testsuite/gcc.target/powerpc/vec-setup-be-long.c	(working copy)
@@ -1,6 +1,6 @@ 
 /* { dg-do run { target { powerpc64le*-*-linux* } } } */
 /* { dg-require-effective-target vsx_hw } */
-/* { dg-options "-O2 -mvsx -maltivec=be" } */
+/* { dg-options "-w -O2 -mvsx -maltivec=be" } */
 
 /* Test various ways of creating vectors with 2 double words and accessing the
    elements.  This test uses the long (on 64-bit systems) or long long datatype