aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAndre Vieira <andre.simoesdiasvieira@arm.com>2023-10-19 18:27:18 +0100
committerAndre Vieira <andre.simoesdiasvieira@arm.com>2023-10-19 18:27:18 +0100
commit53d40858c8370b2079bfb017c6870b244b718800 (patch)
tree19ee8df08adc58553b65bb88ea186cfec82f039c /gcc
parent87d97e26076a131541e8562932248bc24590e38f (diff)
downloadgcc-53d40858c8370b2079bfb017c6870b244b718800.zip
gcc-53d40858c8370b2079bfb017c6870b244b718800.tar.gz
gcc-53d40858c8370b2079bfb017c6870b244b718800.tar.bz2
parloops: Allow poly nit and bound
Teach parloops how to handle a poly nit and bound e ahead of the changes to enable non-constant simdlen. gcc/ChangeLog: * tree-parloops.cc (try_transform_to_exit_first_loop_alt): Accept poly NIT and ALT_BOUND.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/tree-parloops.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/tree-parloops.cc b/gcc/tree-parloops.cc
index a35f3d5..80f3dd6 100644
--- a/gcc/tree-parloops.cc
+++ b/gcc/tree-parloops.cc
@@ -2531,14 +2531,15 @@ try_transform_to_exit_first_loop_alt (class loop *loop,
tree nit_type = TREE_TYPE (nit);
/* Figure out whether nit + 1 overflows. */
- if (TREE_CODE (nit) == INTEGER_CST)
+ if (poly_int_tree_p (nit))
{
if (!tree_int_cst_equal (nit, TYPE_MAX_VALUE (nit_type)))
{
alt_bound = fold_build2_loc (UNKNOWN_LOCATION, PLUS_EXPR, nit_type,
nit, build_one_cst (nit_type));
- gcc_assert (TREE_CODE (alt_bound) == INTEGER_CST);
+ gcc_assert (TREE_CODE (alt_bound) == INTEGER_CST
+ || TREE_CODE (alt_bound) == POLY_INT_CST);
transform_to_exit_first_loop_alt (loop, reduction_list, alt_bound);
return true;
}