From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 999023858D32; Fri, 12 Jan 2024 17:41:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 999023858D32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1705081280; bh=3RskDbuoSmBH32iWn4AOfNey1GeTbEnvr//7A/ErqhE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=H44wyq2dilFivOwyVN64QZSLEhO93lxOF0NFfPn3g8gVkp+aYjevtgruD9Yj5U3Bp i5OaUKILjWUc4tWVaptl8SJhs8IDYpYOnAvOdaUNl/pRfqoDcE6tpy9lWc4WnLEc/b 9FEcXg6VYWjFukDdohGK2gKENz8VX+Qp/hyVQIOA= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/113358] OpenMP inhibits vectorization Date: Fri, 12 Jan 2024 17:41:20 +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: 13.2.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia 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: attachments.created 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=3D113358 --- Comment #1 from Andrew Pinski --- Created attachment 57055 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D57055&action=3Dedit testcase that does vectorize with openmp though So what is happening is loop invariant motion is not happening with the ope= nmp version, I have not looked into why exactly. BUT you can manually it for the loop and get a vectorized version of the loop.=