Re: [Vectorizer] Support masking fold left reductions

2019-06-17 Thread Richard Sandiford
Sorry for the slow review. Alejandro Martinez Vicente writes: > diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c > index 4942c69..7840ed8 100644 > --- a/gcc/tree-vect-loop.c > +++ b/gcc/tree-vect-loop.c > @@ -5881,6 +5881,31 @@ vect_expand_fold_left (gimple_stmt_iterator *gsi, tree > sca

[Vectorizer] Support masking fold left reductions

2019-06-12 Thread Alejandro Martinez Vicente
Hi, This patch adds support in the vectorizer for masking fold left reductions. This avoids the need to insert a conditional assignment with some identity value. For example, this C code: double f (double *restrict x, int n) { double res = 0.0; for (int i = 0; i < n; i++) { res +=