2015-10-19 19:05 GMT+03:00 Jeff Law <l...@redhat.com>: > On 10/19/2015 05:21 AM, Ilya Enkovich wrote: >> >> Hi, >> >> This patch adds missing support for cond_expr with no embedded comparison >> in SLP. No new test added because vec cmp SLP test becomes (due to changes >> in bool patterns by the first patch) a regression test for this patch. Does >> it look OK? >> >> Thanks, >> Ilya >> -- >> gcc/ >> >> 2015-10-19 Ilya Enkovich <enkovich....@gmail.com> >> >> * tree-vect-slp.c (vect_get_and_check_slp_defs): Allow >> cond_exp with no embedded comparison. >> (vect_build_slp_tree_1): Likewise. > > Is it even valid gimple to have a COND_EXPR that is anything other than a > conditional? > > From looking at gimplify_cond_expr, it looks like we could have a SSA_NAME > that's a bool as the conditional. Presumably we're allowing a vector of > bools as the conditional once we hit the vectorizer, which seems fairly > natural.
Currently vectorizer doesn't handle such COND_EXPR and never produces VEC_COND_EXPR with SSA_NAME as a condition. Expand treats such VEC_COND_EXPR as implicit (OP < 0) case (we just have no optab to expand it with no comparison). But the first patch in this series[1] allows such conditions to enable re-using vector comparison result by multiple VEC_COND_EXPRs. > > OK. Please install when the prerequisites are installed. > > Thanks, > jeff > Thanks! Ilya [1] https://gcc.gnu.org/ml/gcc-patches/2015-10/msg00862.html