This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, rs6000] Fix PR target/71733, ICE with -mcpu=power9 -mno-vsx
- From: Michael Meissner <meissner at linux dot vnet dot ibm dot com>
- To: Peter Bergner <bergner at vnet dot ibm dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Segher Boessenkool <segher at kernel dot crashing dot org>, David Edelsohn <dje dot gcc at gmail dot com>, Bill Schmidt <wschmidt at linux dot vnet dot ibm dot com>, Michael Meissner <meissner at linux dot vnet dot ibm dot com>, Aaron Sawdey <acsawdey at linux dot vnet dot ibm dot com>
- Date: Wed, 6 Jul 2016 15:19:57 -0400
- Subject: Re: [PATCH, rs6000] Fix PR target/71733, ICE with -mcpu=power9 -mno-vsx
- Authentication-results: sourceware.org; auth=none
- References: <ed8225d9-e937-30fd-ab80-648f557cc0ff@vnet.ibm.com>
On Tue, Jul 05, 2016 at 09:26:50PM -0500, Peter Bergner wrote:
> The following patch fixes a bug where we do not disable POWER9 vector dform
> addressing when we compile for POWER9 but without VSX support. This manifested
> itself with us trying to use dform addressing with altivec loads/stores
> which is illegal, leading to an ICE.
>
> This has bootstrapped and regtested with no regessions. Ok for trunk?
>
> This also affects the FSF 6 branch, ok there too, assuming bootstrap and
> regtesting complete cleanly?
>
> Peter
>
> gcc/
> * config/rs6000/rs6000.c (rs6000_option_override_internal): Disable
> -mpower9-dform-vector when disabling -mpower9-vector.
>
> gcc/testsuite/
> * gcc.target/powerpc/pr71733.c: New test.
>
>
> Index: gcc/config/rs6000/rs6000.c
> ===================================================================
> --- gcc/config/rs6000/rs6000.c (revision 237945)
> +++ gcc/config/rs6000/rs6000.c (working copy)
> @@ -4303,7 +4303,8 @@ rs6000_option_override_internal (bool gl
> {
> if (rs6000_isa_flags_explicit & OPTION_MASK_P8_VECTOR)
> error ("-mpower9-vector requires -mpower8-vector");
> - rs6000_isa_flags &= ~OPTION_MASK_P9_VECTOR;
> + rs6000_isa_flags &= ~(OPTION_MASK_P9_VECTOR
> + | OPTION_MASK_P9_DFORM_VECTOR);
> }
Note, this should be
+ rs6000_isa_flags &= ~(OPTION_MASK_P9_VECTOR_SCALAR
+ | OPTION_MASK_P9_DFORM_VECTOR);
However, we probably need to add all of the other options that depend on VSX.
--
Michael Meissner, IBM
IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA
email: meissner@linux.vnet.ibm.com, phone: +1 (978) 899-4797