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] Handle conflicting target options -mno-power9-vector and -mcpu=power9



On 03/22/2017 05:35 PM, Segher Boessenkool wrote:
> On Wed, Mar 22, 2017 at 11:44:49AM -0600, Kelvin Nilsen wrote:
>> Internal testing recently revealed that use of the -mno-power9-vector
>> target option in combination with the -mcpu=power9 target option
>> results in termination of gcc with the error message:
>>
>>   power9-dform requires power9-vector
> 
>> In both cases, the preferred behavior is that the target option
>> -mno-power9-vector causes power9-dform to be automatically disabled.
>>  This patch implements the preferred behavior and adds a test case to
>> demonstrate the fix.
> 
> Or it could do -mpower9-dform-scalar but disable -mpower9-dform-vector?
> That seems more reasonable.

The internal problem report sent to me said "-mno-power9-vector should
override power9-dform unless the latter has been deliberately specified
by the user."  I'm just following orders.  If you think it preferable to
only override -mpower-dform-vector, I'll make that modification.

> 
> Ideally none of the -mpower9-dform* or -mpower9-vector options would
> exist at all, of course.
> 
>> 2017-03-21  Kelvin Nilsen  <kelvin@gcc.gnu.org>
>>
>> 	* config/rs6000/rs6000.c (rs6000_option_override_internal): Change
>> 	handling of certain combinations of target options, including the
>> 	combinations -mpower8-vector vs. -mno-vsx, -mpower8-vector vs.
>> 	-mno-power8-vector, and -mpower9_dform vs. -mno-power9-vector.
> 
> Those other changes are independent?

Actually, these other changes are not independent.  My initial attempt
at a patch only changed the behavior of -mpower9_dform vs.
-mno-power9-vector.  But this actually resulted in a regression of an
existing test.  To "properly" handle the new case without impacting
existing "established" behavior (as represented in the existing dejagnu
testsuite), I had to make these other changes as well.


> 
> 
> Segher
> 
> 

-- 
Kelvin Nilsen, Ph.D.  kdnilsen@linux.vnet.ibm.com
home office: 801-756-4821, cell: 520-991-6727
IBM Linux Technology Center - PPC Toolchain


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