[Bug tree-optimization/92429] [10 Regression] ICE in vect_transform_stmt, at tree-vect-stmts.c:10918
avieira at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Nov 11 13:37:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92429
--- Comment #2 from avieira at gcc dot gnu.org ---
So I had a look at this, the ICE occurs because 'vectorizable_condition' does
not know how to handle a constant cond_expr.
The reason this cond_expr is constant in the epilogue is because
'simplify_replace_tree' folds the replacement and the replacement in this case
is:
"_34 < 0" where "_34 = _33 * _33", and fold-const is able to assert that _34 is
therefore always positive or zero and can fold the check to false. The question
now is, why was the original 'cond_expr' that we copied over not folded? I
suspect its because of the -fno-tree-fre.
If we want this to work I suggest we either:
1) teach 'vectorizable_condition' to learn how to deal with constant
cond_expr's
2) change 'simplify_replace_tree' to optionally fold.
I don't like 2) much because this doesn't guarantee we don't fold elsewhere.
If we want the vectorizer to accept loop code in sub-optimal format I suggest
we do 1).
More information about the Gcc-bugs
mailing list