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

Michael Meissner meissner@linux.vnet.ibm.com
Wed Jul 6 23:29:00 GMT 2016


On Wed, Jul 06, 2016 at 05:01:38PM -0500, Peter Bergner wrote:
> On 7/6/16 2:19 PM, Michael Meissner wrote:
> >On Tue, Jul 05, 2016 at 09:26:50PM -0500, Peter Bergner wrote:
> >>-      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);
> 
> I think you mean the following, since we have to disable -mpower9-vector
> too:
> 
> -      rs6000_isa_flags &= ~OPTION_MASK_P9_VECTOR;
> +      rs6000_isa_flags &= ~(OPTION_MASK_P9_VECTOR
> +			    | OPTION_MASK_P9_DFORM_SCALAR
> +			    | OPTION_MASK_P9_DFORM_VECTOR);
> 
> I had thought about adding the dform scalar flag, but it was already
> correctly disabled and I wasn't sure whether we could have the p9
> dform scalar without the vector part.  Probably not, so consider
> the patch above as the latest.

Yes, you can have P9 dform scalar without P9 dform vector.

> 
> >However, we probably need to add all of the other options that depend on VSX.
> 
> Yes, there is a cascade affect on the disabling of options when you
> explicitly disable something.  It'd be nice if this was somehow
> automated, where we have some table showing the dependencies of
> the options and the compiler just follows the table disabling things
> that depend on something that has been disabled.  Could be hard to
> make that dependency list though, given how many we have.

Yep.  I'm thinking we need masks in rs6000-cpus.def of the options to turn off
if -mno-vsx (and even worse -mno-altivec).

-- 
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



More information about the Gcc-patches mailing list