From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C6F783857C4F; Mon, 8 Apr 2024 12:19:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C6F783857C4F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1712578763; bh=OXjED9vJ7hvkIsaNIPXHvFJLfs64oEsWpQHI7BYLB74=; h=From:To:Subject:Date:In-Reply-To:References:From; b=bWX5LAgMtdlmpLabl7nl14M74lPBNb4k4Y0WZbx7uQQwe8MjqTS6ZKNJa60LRvMms HxoaFjd7ccoWzsQHf34Xi7CAaxmLX29GTElCPlHaSGw9g+uxDuPBPj8XzFs5CGgrqr Xu6SE1SQ94TecQsl+DusLIC6qMiJ+4hXjbcUPiqg= 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, 08 Apr 2024 12:19:21 +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: keywords blocked cc 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 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |openmp Blocks| |53947 CC| |rguenth at gcc dot gnu.org, | |rsandifo at gcc dot gnu.org --- Comment #2 from Richard Biener --- We have (compute_affine_dependence ref_a: D.5604[_33], stmt_a: _65 =3D D.5604[_33]; ref_b: D.5604[_33], stmt_b: D.5604[_33] =3D _ifc__144; ) -> dependence analysis failed but of course safelen should apply here, but we likely hit if (max_vf !=3D MAX_VECTORIZATION_FACTOR && maybe_lt (max_vf, min_vf)) return opt_result::failure_at (vect_location, "bad data dependence.\n"); we have max_vf =3D=3D 16 but min_vf is {4, 4} with E_VNx4SFmode. Maybe safelen (and thus max_vf) needs to be poly-int? Maybe somehow safelen needs to be ensured by additional masking with SVE? Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D53947 [Bug 53947] [meta-bug] vectorizer missed-optimizations=