From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1971) id A29D0385773F; Thu, 19 Oct 2023 17:30:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A29D0385773F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1697736651; bh=iDOMNZ39Ur8eq8j2y6+TcDPAKmMiVxam/1OmVqZJAf4=; h=From:To:Subject:Date:From; b=aIQAQBpIvsiBc92vc0ZHuccaK+Oa18I8Q4Iy74lpvy6RTVl3o5zQihhhOeG43zTW7 GOoxKD73ZVV5UkvYUCow2GbktZK0M6LHVytVaXIHFN3uAa21GZJh3Uxj/bMPnq3Fz6 /QsqhTuDcYJLLsM8m3kRkgKDABK6XMSGFcFs8IDU= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Andre Simoes Dias Vieira To: gcc-cvs@gcc.gnu.org Subject: [gcc r14-4763] parloops: Allow poly nit and bound X-Act-Checkin: gcc X-Git-Author: Andre Vieira X-Git-Refname: refs/heads/master X-Git-Oldrev: 87d97e26076a131541e8562932248bc24590e38f X-Git-Newrev: 53d40858c8370b2079bfb017c6870b244b718800 Message-Id: <20231019173051.A29D0385773F@sourceware.org> Date: Thu, 19 Oct 2023 17:30:51 +0000 (GMT) List-Id: https://gcc.gnu.org/g:53d40858c8370b2079bfb017c6870b244b718800 commit r14-4763-g53d40858c8370b2079bfb017c6870b244b718800 Author: Andre Vieira Date: Thu Oct 19 18:27:18 2023 +0100 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. Diff: --- gcc/tree-parloops.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gcc/tree-parloops.cc b/gcc/tree-parloops.cc index a35f3d5023b0..80f3dd6dce28 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; }