Hi All, We implemented enhancement for if-convert phase to recognize the simplest conditional reduction and to transform it vectorizable form, e.g. statement if (A[i] != 0) num+= 1; will be recognized. A new test-case is also provided.
Bootstrapping and regression testing did not show any new failures. Is it OK for trunk? gcc/ChangeLog: 2014-04-17 Yuri Rumyantsev <ysrum...@gmail.com> * tree-if-conv.c (is_cond_scalar_reduction): New function. (convert_scalar_cond_reduction): Likewise. (predicate_scalar_phi): Add recognition and transformation of simple conditioanl reduction to be vectorizable. gcc/testsuite/ChangeLog: 2014-04-17 Yuri Rumyantsev <ysrum...@gmail.com> * gcc.dg/cond-reduc.c: New test.
if-conv-cond-reduc.patch
Description: Binary data