From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 873763858028; Mon, 1 Aug 2022 23:44:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 873763858028 From: "undefinedopcode2 at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/106415] loop-ivopts prevents correct usage of dbra with 16-bit loop counters on m68k Date: Mon, 01 Aug 2022 23:44:09 +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 X-Bugzilla-Severity: normal X-Bugzilla-Who: undefinedopcode2 at gmail dot com 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: 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: Mon, 01 Aug 2022 23:44:09 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106415 --- Comment #7 from Undefined Opcode --- (In reply to Undefined Opcode from comment #6) A little more context: Group 1: cand cost compl. inv.expr. inv.vars 0 0 0 NIL; NIL; 1 0 0 NIL; NIL; 2 0 0 NIL; NIL; 3 0 0 NIL; NIL; 4 0 0 NIL; NIL; 5 0 0 NIL; NIL; 6 -1 0 NIL; NIL; 7 0 0 NIL; NIL; 8 0 0 NIL; NIL; I'm not sure what a negative cost means, but it's also odd to me that the o= ther candidates all have the same cost. The candidates requiring 32-bit operatio= ns should be strictly more expensive than those operating on 16-bit data, and indeed they do during the initial candidate costs.=