From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 119863858D1E; Sat, 3 Jun 2023 21:50:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 119863858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1685829027; bh=dkJpBACIaMNBmTltEJ7gLf0HP0SsTrgcIyoS4lnnEBk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=s2kWZ/pfsKu6U6Ilpqx0+sakc3zShOQXBrQsirM46lNBmM+nVCrPooFtOVU7J6St3 JL0AIL1ovqD1uqy/1OztE1SIEeG5bJ7AGVZFwDukzxTjnQxHxXQ8WFhxj4fMS34TK/ +uD8ToOOlqIAi7FRh5Xtl0D391O8V686FsUfBiy4= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/58517] ifcvt (after combine) puts ccreg clobbering insn between ccset insn and ccreg use Date: Sat, 03 Jun 2023 21:50:25 +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: 4.9.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia 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: 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=3D58517 --- Comment #15 from Andrew Pinski --- I was thinking of improving this is modify noce_get_condition here (we still need the previous patch just in case we still get the T register). Right now noce_get_condition will stop at: (eq (reg:SI 147 t) (const_int 0 [0])) Because of: /* If the condition variable is a register and is MODE_INT, accept it. */ cond =3D XEXP (SET_SRC (set), 0); tmp =3D XEXP (cond, 0); if (REG_P (tmp) && GET_MODE_CLASS (GET_MODE (tmp)) =3D=3D MODE_INT && (GET_MODE (tmp) !=3D BImode || !targetm.small_register_classes_for_mode_p (BImode))) But since 147 is a hard register but maybe since it is hard register and REGNO_REG_CLASS (147) =3D=3D T_REGS and the register class of T_REGS is onl= y one register so consider a small register class. This I think is related to the option 2 in comment #3.=