Revital Eres <revital.e...@linaro.org> writes: > +/* Return true if one of the definitions in INSN has MODE_CC. Otherwise > + return false. */ > +static bool > +def_has_ccmode_p (rtx insn) > +{ > + df_ref *def; > + > + for (def = DF_INSN_DEFS (insn); *def; def++) > + { > + enum machine_mode mode = GET_MODE (DF_REF_REG (*def)); > + > + if (GET_MODE_CLASS (mode) == MODE_CC) > + return true; > + } > + > + return false; > +}
FWIW, an alternative might be to test have_regs_of_mode[(int) mode]. That says whether there are any allocatable (non-fixed) registers of the given mode. Richard