From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CD2403858C53; Mon, 15 Apr 2024 08:06:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CD2403858C53 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1713168371; bh=7LVWUcAt6FlwDJcuVrJUKoVzsxuDzR9E7W4/OuXff1E=; h=From:To:Subject:Date:In-Reply-To:References:From; b=DrEgChMIZJhb/wQYTHhPgFcvuuSGO5zP4a/gkknCjAenTyF6qgLQ3l9SUSI1XH3Jh 2/cfYc3DQ+uG2+yhyh+fQ/dd1zu0qSkRlpg1gS7nuKDnSqkBQE0O8C+yl7OWwopSOI K3dA4GL3y5TYOk3XWa8CYVt1LPfwvhuvgiyQTxYE= From: "rguenth 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:06:11 +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: rguenth 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 #14 from Richard Biener --- I think 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); should simply become safelen_int =3D constant_upper_bound_with_limit (val, INT_MAX); ? 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= ?=