This is the mail archive of the
mailing list for the GCC project.
Re: Adapt one fold-const optimization for vectors
On Tue, Oct 30, 2012 at 01:14:40PM +0100, Marc Glisse wrote:
> On Tue, 30 Oct 2012, Marek Polacek wrote:
> >On Tue, Oct 30, 2012 at 08:05:13AM +0100, Marc Glisse wrote:
> >>one more optimization that needed help for vectors, it crashed on
> >>(x<y)<0. Because of PR 55001, testcases are awkward to add (I could
> >>do a x86-only one if needed).
> >>2012-10-30 Marc Glisse <firstname.lastname@example.org>
> >> * fold-const.c (fold_binary_op_with_conditional_arg): Handle vectors.
> >> (fold_binary_loc): call it for VEC_COND_EXPR.
Capital C instead of lowercase.
> >Patch missing?
> Indeed, thanks for the notice.
FAIL: g++.dg/other/vector-compare.C (internal compiler error)
FAIL: g++.dg/other/vector-compare.C (test for excess errors)
on i686-linux. The problem is that tree-vect-generic.c doesn't expand
BLKmode VEC_COND_EXPR piecewise. So, either fold-const on this optimization
needs to test whether expand_vec_cond_expr_p is true for the chosen
pair of comparison type and operand type, or tree-vect-generic.c needs to be
tought to expand VEC_COND_EXPR piecewise if expand_vec_cond_expr_p is not
true for the particular VEC_COND_EXPR.