From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 553153858C41; Tue, 14 Nov 2023 17:36:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 553153858C41 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1699983403; bh=P1GM491rlo77Sp/yrki1dYkzoVMbdszlLuGh87x7ezk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=tS6L/IIe+Jtj6+M/DWEcA3iQ9RIWClnx5Bxr1u1wMiNRMDs7XcYtmh9/LFEeeA3oF sofnYUiSMRm9Ffm56iT7uD+bczoz2dm7MJImThJLypVJjvuZwvejAJQTRnuk+f9/Jj 8EJ/KaWO4U84nhyf0BNJvK6h4ApwOuarDPyPutMQ= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/78904] zero-extracts are not effective Date: Tue, 14 Nov 2023 17:36:41 +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: 7.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: ubizjak at gmail dot com X-Bugzilla-Target-Milestone: 7.0 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=3D78904 --- Comment #19 from CVS Commits --- The master branch has been updated by Uros Bizjak : https://gcc.gnu.org/g:b42a09b258c3ed8d1368e0ef0948034dcf0f8ac9 commit r14-5456-gb42a09b258c3ed8d1368e0ef0948034dcf0f8ac9 Author: Uros Bizjak Date: Tue Nov 14 18:34:43 2023 +0100 i386: Generate strict_low_part QImode insn with high input register Following testcase: struct S1 { unsigned char val; unsigned char pad1; unsigned short pad2; }; struct S2 { unsigned char pad1; unsigned char val; unsigned short pad2; }; struct S1 test_and (struct S1 a, struct S2 b) { a.val &=3D b.val; return a; } compiles with -O2 to: movl %esi, %edx movl %edi, %eax movzbl %dh, %esi andb %sil, %al ANDB could use high register %dh instead of %sil: movl %edi, %eax movl %esi, %edx andb %dh, %al Patch introduces strict_low_part QImode insn patterns with one of its input arguments extracted from high register. PR target/78904 gcc/ChangeLog: * config/i386/i386.md (*addqi_ext_1_slp): New define_insn_and_split pattern. (*subqi_ext_1_slp): Ditto. (*qi_ext_1_slp): Ditto. gcc/testsuite/ChangeLog: * gcc.target/i386/pr78904-7.c: New test. * gcc.target/i386/pr78904-7a.c: New test. * gcc.target/i386/pr78904-7b.c: New test.=