From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8C3B8383B6D1; Fri, 16 Dec 2022 13:59:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8C3B8383B6D1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1671199185; bh=l+qOvCAniZL/5+P2rMP3Tika9EBsHNag7sX1HhCcDXM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=beD04ZqlC4PUV/sguz+SlXou5coyCLhjAWuQVuJfwpcSWgXFQhLMJutU0p4/kKA9+ tgZMhTmCZdi26cCjFfKG+slLFrJZDr3WofIZOONpkWrqRQOrL2S4xjmkfSEkvl3PIN xIXxnTCC+gg/Q0XfXnINcH03je8Tx9XsaKYE9wR0= From: "gjl at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/90706] [10/11/12/13 Regression] Useless code generated for stack / register operations on AVR Date: Fri, 16 Dec 2022 13:59:42 +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: 9.1.0 X-Bugzilla-Keywords: missed-optimization, ra X-Bugzilla-Severity: normal X-Bugzilla-Who: gjl at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P4 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc attachments.created 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=3D90706 Georg-Johann Lay changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gjl at gcc dot gnu.org --- Comment #16 from Georg-Johann Lay --- Created attachment 54113 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D54113&action=3Dedit More elaborate C test case. This is a more complicated test case, compile with > avr-gcc -c pi-i.c -mmcu=3Datmega8 -Os -mcall-prologues -fno-tree-loop-opt= imize -fno-move-loop-invariants && avr-size pi-i.o Code sizes are: 664 with avr-gcc v8.5 992 with avr-gcc v11.3 834 with avr-gcc master with the change from comment #13 So there is a clear improvement with patch #13, but size is still +25% comp= ared to v8. What also has an effect is -fno-split-wide-types. The test case mostly operates on float; unfortunately I don't have a similar test-case for 32-bit integers at hand.=