This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, rs6000] Fix PR target/71733, ICE with -mcpu=power9 -mno-vsx


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]