From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 92C403858C35; Wed, 24 Jan 2024 16:42:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 92C403858C35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1706114578; bh=ssjsjGQEfqnpHysOHPHoOlwcKr+qcyKYTqYxUH3Wtpw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=c3TfKDc4wsbUGG6YNO/UG9+2YO3OOvUKK52+8GlHVCbi5UrCA3dGigTJejwzIi6ON 0pWU8+7+F/rEMTttwYkSukl5uF+pw6Cy1Tt84uSwPN0eaypgM0kM5/kRf4TYH0Rabx qO0P6Jr84rTImeJw2VsW15gOmZzHyDe/N+7dXBP8= From: "rearnsha at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/113542] [14 Regression] gcc.target/arm/bics_3.c regression after change for pr111267 Date: Wed, 24 Jan 2024 16:42:58 +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: 14.0 X-Bugzilla-Keywords: missed-optimization, testsuite-fail X-Bugzilla-Severity: normal X-Bugzilla-Who: rearnsha at gcc dot gnu.org 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: keywords 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=3D113542 Richard Earnshaw changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |missed-optimization --- Comment #2 from Richard Earnshaw --- The costing code is expecting (parallel [ (set (reg:SI 124 [ _7 ]) (ne:SI (reg:SI 122 [ _2 ]) (const_int 0 [0]))) (clobber (reg:CC 100 cc)) ]) To result in the assembler output SUBS r124, R122, #1 SBC r124, R122, r124 so really should have a cost of 8 (two insns). But for some reason the thu= mb2 back-end is not generating that output in this case. Overall, that means t= hat for bic_si_test BIC r0, r0, r1 SUBS r1, r0, #1 SBC r0, r0, r1 is neither better nor worse than BICS r0, r0, r1 IT ne MOVNE r0, #1 and certainly better than BICS r0, r0, r1 ITE ne MOVNE r2, #1 MOVEQ r2, #0 at least when it comes to code size. So the test is somewhat flaky, but there is a further problem with the comp= iler not generating the expected sequence for NE(reg, 0) in Thumb2.=