From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 548443858CDB; Mon, 15 Apr 2024 08:15:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 548443858CDB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1713168900; bh=gllrdeAAlaaOGABnQPlWLMo6GmGO+g/hPbxC1HA9mSI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=JXgewNAQb7WeAgHOkRC1rj+IjzwUMym33tbep29rxQdKuDJo2LuLFp71a+OilMdnV EsZnyC5nCO1GCsB7zhsyqeUUn9VP5gZgWl43g4ZwfMrdupxwpgB0/CMZr/O0yBuNIK Sz7gDA5dDSFnFSyYQqWu6/bJFzn3VXlJfjTENnsg= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/114635] OpenMP reductions fail dependency analysis Date: Mon, 15 Apr 2024 08:14:59 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: missed-optimization, openmp X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D114635 --- Comment #16 from Jakub Jelinek --- (In reply to Richard Biener from comment #14) > I think >=20 > if (safelen) > { > poly_uint64 val; > safelen =3D OMP_CLAUSE_SAFELEN_EXPR (safelen); > if (!poly_int_tree_p (safelen, &val)) > safelen_int =3D 0; > else > safelen_int =3D MIN (constant_lower_bound (val), INT_MAX); >=20 > should simply become >=20 > safelen_int =3D constant_upper_bound_with_limit (val, INT_MAX); >=20 > ? Usually targets do have a limit on the actual length but I see > constant_upper_bound_with_limit doesn't query such. But it would > be a more appropriate way to say there might be an actual target limit he= re? OMP_CLAUSE_SAFELEN_EXPR is always an INTEGER_CST, the FEs verify that and e= rror if it is not. So, I must say I don't really understand parts of the r8-5649-g9d2f08ab97be changes. I can understand the intent to make max_vf a poly_int, but don't understand why safelen should be, what would it mean and when it would be s= et that way?=