From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7C1923858CDB; Mon, 26 Feb 2024 07:54:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7C1923858CDB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1708934092; bh=2r/1hFMSpDo0TQC0fmlc5ZD/Lxu1ADLHwOP8yEcI4CM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=PZUzaLSr4+nrqPlU55D/Vnu9LKYLVgj56fqdI4/miJJwMNZEWNxJnUGW1IpAReeJ6 5j6ytvgdBmYbQPkyeDCWX3Wqnr7xiUx3tCA/1UvJfgo1+LvskfwbTc8hi4v/v6lGKR LCOWnupE/jbI1oZ269y16R9bXjluqylPLYdDDxTQ= From: "liuhongt at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/114107] poor vectorization at -O3 when dealing with arrays of different multiplicity, good with -O2 Date: Mon, 26 Feb 2024 07:54:52 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 13.2.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: liuhongt 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=3D114107 --- Comment #11 from Hongtao Liu --- (In reply to N Schaeffer from comment #9) > In addition, optimizing for size with -Os leads to a non-vectorized > double-loop (51 bytes) while the vectorized loop with vbroadcastsd (produ= ced > by clang -Os) leads to 40 bytes. > It is thus also a missed optimization for -Os. vectorization is enabled with O2 but not Os.=