[gcc(refs/users/tnfchris/heads/gcc-14-early-break)] Don't enter piecewise expansion if VF is not constant.
Tamar Christina
tnfchris@gcc.gnu.org
Wed Jun 28 13:32:27 GMT 2023
https://gcc.gnu.org/g:cac6efc11af28fd95dfb35520a3a4aa385fedf70
commit cac6efc11af28fd95dfb35520a3a4aa385fedf70
Author: Tamar Christina <tamar.christina@arm.com>
Date: Wed Jun 28 13:42:51 2023 +0100
Don't enter piecewise expansion if VF is not constant.
expand_vector_piecewise does not support VLA expansion as it has a hard assert
on the type not being VLA.
Instead of just failing to expand and so the call marked unsupported we ICE.
This adjust it so we don't and can gracefully handle the expansion in support
checks.
gcc/ChangeLog:
* tree-vect-generic.cc (expand_vector_comparison): Skip piecewise if not
constant.
Diff:
---
gcc/tree-vect-generic.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/tree-vect-generic.cc b/gcc/tree-vect-generic.cc
index df04a0db68d..da1fd2f40d8 100644
--- a/gcc/tree-vect-generic.cc
+++ b/gcc/tree-vect-generic.cc
@@ -481,7 +481,7 @@ expand_vector_comparison (gimple_stmt_iterator *gsi, tree type, tree op0,
}
t = gimplify_build1 (gsi, VIEW_CONVERT_EXPR, type, t);
}
- else
+ else if (TYPE_VECTOR_SUBPARTS (type).is_constant ())
t = expand_vector_piecewise (gsi, do_compare, type,
TREE_TYPE (TREE_TYPE (op0)), op0, op1,
code, false);
More information about the Gcc-cvs
mailing list