From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 880A63858D39; Sun, 25 Feb 2024 23:40:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 880A63858D39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1708904431; bh=twYgsV0h8Z2U6H7MR4Bc8JFkZ6NxpyBByTb3KiQDqNU=; h=From:To:Subject:Date:From; b=J+t15YJs2jToVO+FeArGX5Q0gZ6pLn/hekM2epoJVBxNSuc/BTZ9wy258GMj3mh3J 8S9UomO/2bAFPx/cOnsK16g54N8bimLbNijlM95cXrqCqfkZdUVGAj7vfq7Uh5jIT7 veB2Fd5e7yYwjzbc9A2Sp1zjibL8Owhai/bf0dTY= From: "nathanael.schaeffer at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/114107] New: poor vectorization at -O3 when dealing with arrays of different multiplicity, good with -O2 Date: Sun, 25 Feb 2024 23:40:30 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 13.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: nathanael.schaeffer at gmail dot com 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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=3D114107 Bug ID: 114107 Summary: poor vectorization at -O3 when dealing with arrays of different multiplicity, good with -O2 Product: gcc Version: 13.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: nathanael.schaeffer at gmail dot com Target Milestone: --- A simple loop multiplying two arrays, with different multiplicity fails to vectorize efficiently with -O3. Target is AVX x86_64. The loop is the following, where 4 consecutive values in data are multiplie= d by the same factor : for (int i=3D0; i