From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1160B3858CD1; Thu, 21 Mar 2024 08:31:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1160B3858CD1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1711009915; bh=QqNEYPyWTPGsnm65gVtHasFM0K+7/jMZCXMIZo65+R0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=CXt67ylHPVz5NVlkugDXmf5apWRbih0s5Wo8s3s2x1bV8OJR8tMsof0rPQV2vNEJY s0aNCYCIgTwUcGcemoxj6OpkNFOzlF5w1knF5oCoEoRlxiu8vNG52SqzodyjecJp3T iIMzyECW+yHHeZP+2430kwLxguV/VpdlaFietIMY= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/92080] Missed CSE of _mm512_set1_epi8(c) with _mm256_set1_epi8(c) Date: Thu, 21 Mar 2024 08:31:49 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 10.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement 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: --- 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=3D92080 --- Comment #10 from Richard Biener --- But it's even simpler than the cited case - the mode has the same size (for= the latest testcase, not for the original one, of course). It's also that after reload a zeroing of V4SImode will also zero ymm but of course setting V4SImode to all-ones will not set the upper half of ymm to all-ones but instead "zero-extends". With CSE it becomes then important what set comes first. If the larger mode set comes first it's easier. If the smaller mode set comes first you'd have to change that to a larger one (if the zero-extension is not what you want).=