SLP analysis of early break conditions asserts pattern recognition
canonicalized all of them. But the pattern can fail, for example
when vector types cannot be computed. So be graceful here, so
we don't ICE when we didn't yet compute vector types.
* tree-vect-slp.cc (vect_analyze_slp): Fail for non-canonical
gconds.
tree args0 = gimple_cond_lhs (stmt);
tree args1 = gimple_cond_rhs (stmt);
- /* These should be enforced by cond lowering. */
- gcc_assert (gimple_cond_code (stmt) == NE_EXPR);
- gcc_assert (zerop (args1));
+ /* These should be enforced by cond lowering, but if it failed
+ bail. */
+ if (gimple_cond_code (stmt) != NE_EXPR
+ || TREE_TYPE (args0) != boolean_type_node
+ || !integer_zerop (args1))
+ {
+ roots.release ();
+ continue;
+ }
/* An argument without a loop def will be codegened from vectorizing the
root gcond itself. As such we don't need to try to build an SLP tree