https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58517
--- Comment #15 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
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 = XEXP (SET_SRC (set), 0);
tmp = XEXP (cond, 0);
if (REG_P (tmp) && GET_MODE_CLASS (GET_MODE (tmp)) == MODE_INT
&& (GET_MODE (tmp) != 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) == T_REGS and the register class of T_REGS is only one
register so consider a small register class.
This I think is related to the option 2 in comment #3.