From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 10DF83858406; Thu, 18 Nov 2021 07:09:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 10DF83858406 From: "crazylht at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/103252] questionable codegen with kmovd Date: Thu, 18 Nov 2021 07:09:45 +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: 11.2.0 X-Bugzilla-Keywords: missed-optimization, ra X-Bugzilla-Severity: normal X-Bugzilla-Who: crazylht at gmail dot com 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 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: Thu, 18 Nov 2021 07:09:46 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103252 --- Comment #10 from Hongtao.liu --- (In reply to Andrew Pinski from comment #4) > (In reply to Jason A. Donenfeld from comment #2) > > Here's a more minimal test case: https://gcc.godbolt.org/z/15hnsb6of >=20 > kmovd k0, ecx > mov ecx, DWORD PTR __libc_tsd_CTYPE_B@gotntpoff[ebx] > kmovd eax, k0 > mov ecx, DWORD PTR gs:[ecx] > test BYTE PTR 1[ecx+eax*2], 32 >=20 > vs: >=20 > mov ecx, DWORD PTR __libc_tsd_CTYPE_B@gotntpoff[ebx] > mov ecx, DWORD PTR gs:[ecx] > test BYTE PTR 1[ecx+edx*2], 32 >=20 Why cprop_hardreg can't handle this?=