On Wed, Jan 04, 2017 at 01:31:28PM +0100, Richard Biener wrote:
> >  And not sure why this actually
> > is RejectNegative, wouldn't
> > Common Alias(fvect-cost-model=,dynamic,unlimited)
> > work just on fvect-cost-model (can test that)?
> 
> Good question ;)  If it works, ok.

And here is a patch for that, in addition to bootstrap/regtests I've
tried in the debugger the effect of both -fvect-cost-model and
-fno-vect-cost-model and they set global_options.x_flag_vect_cost_model
to the expected enum values in each case.

Ok for trunk?

2017-01-04  Jakub Jelinek  <ja...@redhat.com>

        * common.opt (fvect-cost-model): Remove RejectNegative flag, use
        3 argument Alias with unlimited for the negative form.
        (fno-vect-cost-model): Removed.

--- gcc/common.opt.jj   2017-01-01 12:45:37.000000000 +0100
+++ gcc/common.opt      2017-01-04 18:30:32.239318711 +0100
@@ -2706,13 +2706,9 @@ EnumValue
 Enum(vect_cost_model) String(cheap) Value(VECT_COST_MODEL_CHEAP)
 
 fvect-cost-model
-Common RejectNegative Alias(fvect-cost-model=,dynamic)
+Common Alias(fvect-cost-model=,dynamic,unlimited)
 Enables the dynamic vectorizer cost model.  Preserved for backward 
compatibility.
 
-fno-vect-cost-model
-Common RejectNegative Alias(fvect-cost-model=,unlimited)
-Enables the unlimited vectorizer cost model.  Preserved for backward 
compatibility.
-
 ftree-vect-loop-version
 Common Ignore
 Does nothing. Preserved for backward compatibility.


        Jakub

Reply via email to