Message ID | alpine.DEB.2.02.1209221331460.19797@stedding.saclay.inria.fr |
---|---|
State | New |
Headers | show |
On Sat, Sep 22, 2012 at 1:53 PM, Marc Glisse <marc.glisse@inria.fr> wrote: > Hello, > > this patch removes one copy of a block of code that somehow ended up > duplicated. Richard Henderson apparently already fixed part of the problem > here: > > http://gcc.gnu.org/ml/gcc-patches/2011-10/msg00120.html > > but missed this bit (or was it a different patch?). > > Not yet tested (seems obvious enough), but I'll still do it after I get an > ok. Ok. Thanks, Richard. > 2012-09-24 Marc Glisse <marc.glisse@inria.fr> > > * expr.c (do_store_flag): Remove duplicated code. > > -- > Marc Glisse > Index: expr.c > =================================================================== > --- expr.c (revision 191640) > +++ expr.c (working copy) > @@ -10679,33 +10679,22 @@ do_store_flag (sepops ops, rtx target, e > /* For vector typed comparisons emit code to generate the desired > all-ones or all-zeros mask. Conveniently use the VEC_COND_EXPR > expander for this. */ > if (TREE_CODE (ops->type) == VECTOR_TYPE) > { > tree ifexp = build2 (ops->code, ops->type, arg0, arg1); > tree if_true = constant_boolean_node (true, ops->type); > tree if_false = constant_boolean_node (false, ops->type); > return expand_vec_cond_expr (ops->type, ifexp, if_true, if_false, > target); > } > > - /* For vector typed comparisons emit code to generate the desired > - all-ones or all-zeros mask. Conveniently use the VEC_COND_EXPR > - expander for this. */ > - if (TREE_CODE (ops->type) == VECTOR_TYPE) > - { > - tree ifexp = build2 (ops->code, ops->type, arg0, arg1); > - tree if_true = constant_boolean_node (true, ops->type); > - tree if_false = constant_boolean_node (false, ops->type); > - return expand_vec_cond_expr (ops->type, ifexp, if_true, if_false, > target); > - } > - > /* Get the rtx comparison code to use. We know that EXP is a comparison > operation of some type. Some comparisons against 1 and -1 can be > converted to comparisons with zero. Do so here so that the tests > below will be aware that we have a comparison with zero. These > tests will not catch constants in the first operand, but constants > are rarely passed as the first operand. */ > > switch (ops->code) > { > case EQ_EXPR: > code = EQ; >
Index: expr.c =================================================================== --- expr.c (revision 191640) +++ expr.c (working copy) @@ -10679,33 +10679,22 @@ do_store_flag (sepops ops, rtx target, e /* For vector typed comparisons emit code to generate the desired all-ones or all-zeros mask. Conveniently use the VEC_COND_EXPR expander for this. */ if (TREE_CODE (ops->type) == VECTOR_TYPE) { tree ifexp = build2 (ops->code, ops->type, arg0, arg1); tree if_true = constant_boolean_node (true, ops->type); tree if_false = constant_boolean_node (false, ops->type); return expand_vec_cond_expr (ops->type, ifexp, if_true, if_false, target); } - /* For vector typed comparisons emit code to generate the desired - all-ones or all-zeros mask. Conveniently use the VEC_COND_EXPR - expander for this. */ - if (TREE_CODE (ops->type) == VECTOR_TYPE) - { - tree ifexp = build2 (ops->code, ops->type, arg0, arg1); - tree if_true = constant_boolean_node (true, ops->type); - tree if_false = constant_boolean_node (false, ops->type); - return expand_vec_cond_expr (ops->type, ifexp, if_true, if_false, target); - } - /* Get the rtx comparison code to use. We know that EXP is a comparison operation of some type. Some comparisons against 1 and -1 can be converted to comparisons with zero. Do so here so that the tests below will be aware that we have a comparison with zero. These tests will not catch constants in the first operand, but constants are rarely passed as the first operand. */ switch (ops->code) { case EQ_EXPR: code = EQ;