From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9BF2C3858C54; Sat, 30 Dec 2023 14:08:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9BF2C3858C54 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1703945309; bh=4g1eZtHYxcBRHirfXgM2LifVaGxXvuMS44gCUns5f1k=; h=From:To:Subject:Date:From; b=sEBWnAv36yogFdyviX37hLGxCM+RB6Fi9b4o3UsGhMUj6AD7csyxTKkKsTcEeBiAQ p7CHTPu96Smq2KEkrzpPk4jc2j5CG2m8kpDcPbsxeqPQkCUDxh+uZyr3tFPG1/WH8+ Oa6/VIdh0oIGmVkWAnC71cm3WvKl/NES8O4u9KDo= From: "syq at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/113180] New: MIPS: bitops on an long long struct uses ins instead dins Date: Sat, 30 Dec 2023 14:08:29 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: syq 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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=3D113180 Bug ID: 113180 Summary: MIPS: bitops on an long long struct uses ins instead dins Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: syq at gcc dot gnu.org Target Milestone: --- ``` struct yy { int x:32; int a:12; int b:12; int c:4; int d:4; }; struct yy xx (struct yy a, long long b) { a.d =3D b; return a; } ``` One DINS is enough for this ops, while currently the result is: ``` dsra $2,$4,32 daddiu $sp,$sp,-32 ins $2,$5,28,4 sd $4,16($sp) sw $2,20($sp) ld $3,16($sp) move $2,$0 sll $4,$3,0 dext $4,$4,0,32 dins $2,$4,0,32 dsrl $3,$3,32 dins $2,$3,32,32 jr $31 daddiu $sp,$sp,32 ```=