From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6DA993858D35; Mon, 15 Apr 2024 08:18:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6DA993858D35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1713169086; bh=eKuErWQvq8IR5Too+SKgo7Rv40ELg/itA1HymG3zcuY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=CD/Cx9I/8hv0FyKLuN4wt0sGiS1xVM8lBuRTlZRgNJ2IcpSS2Gf8ImbNPJpphobLg OpsLWCmy5vXfpGUU9Bv9qJqe6QtuLHBQ2ohXEjb/nxholy4PIg4/kvaFpzmuIoX8KG 3F0ZVtEWS7KFqKC2h6FdaLrVGdskY9ZdVZgg2G08= From: "rguenther at suse dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/114635] OpenMP reductions fail dependency analysis Date: Mon, 15 Apr 2024 08:18:02 +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: rguenther at suse dot de 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 #17 from rguenther at suse dot de --- On Mon, 15 Apr 2024, jakub at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D114635 >=20 > --- 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 = here? >=20 > OMP_CLAUSE_SAFELEN_EXPR is always an INTEGER_CST, the FEs verify that and= error > 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= set > that way? It would be only to "better" encode "infinity". But I see loop->safelen is 'int' but only [0, MAX_INT] is specified so we'd conveniently have say -1 to encode "infinity". We'd have to special case that value anyway?=