From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1FFF13858422; Wed, 24 Nov 2021 13:53:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1FFF13858422 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/103393] [12 Regression] Generating 256bit register usage with -mprefer-avx128 -mprefer-vector-width=128 Date: Wed, 24 Nov 2021 13:53:08 +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: 12.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Nov 2021 13:53:09 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103393 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rearnsha at gcc dot gnu.org --- Comment #3 from Richard Biener --- (In reply to H.J. Lu from comment #2) > (In reply to Richard Biener from comment #1) > > It isn't the vectorizer but memmove inline expansion. I'm not sure it's > > really a bug, but there isn't a way to disable %ymm use besides disabli= ng > > AVX entirely. > > HJ? >=20 > YMM move is generated by loop distribution which doesn't check > TARGET_PREFER_AVX128. I think it's generated by gimple_fold_builtin_memory_op which since Richards changes accepts bigger now, up to MOVE_MAX * MOVE_RATIO and that ends up picking an integer mode via scalar_int_mode mode; if (int_mode_for_size (ilen * 8, 0).exists (&mode) && GET_MODE_SIZE (mode) * BITS_PER_UNIT =3D=3D ilen * 8 && have_insn_for (SET, mode) /* If the destination pointer is not aligned we must be a= ble to emit an unaligned store. */ && (dest_align >=3D GET_MODE_ALIGNMENT (mode) || !targetm.slow_unaligned_access (mode, dest_align) || (optab_handler (movmisalign_optab, mode) !=3D CODE_FOR_nothing))) not sure if there's another way to validate things.=