diff options
Diffstat (limited to 'gcc/rtlanal.cc')
-rw-r--r-- | gcc/rtlanal.cc | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/gcc/rtlanal.cc b/gcc/rtlanal.cc index 87332ff..63a1d08 100644 --- a/gcc/rtlanal.cc +++ b/gcc/rtlanal.cc @@ -5740,7 +5740,8 @@ pattern_cost (rtx pat, bool speed) rtx x = XVECEXP (pat, 0, i); if (GET_CODE (x) == SET) { - if (GET_CODE (SET_SRC (x)) == COMPARE) + if (GET_CODE (SET_SRC (x)) == COMPARE + || GET_MODE_CLASS (GET_MODE (SET_DEST (x))) == MODE_CC) { if (comparison) return 0; @@ -6976,6 +6977,26 @@ add_auto_inc_notes (rtx_insn *insn, rtx x) } } +/* Return true if INSN is the second element of a pair of macro-fused + single_sets, both of which having the same register output as another. */ +bool +single_output_fused_pair_p (rtx_insn *insn) +{ + rtx set, prev_set; + rtx_insn *prev; + + return INSN_P (insn) + && SCHED_GROUP_P (insn) + && (prev = prev_nonnote_nondebug_insn (insn)) + && (set = single_set (insn)) != NULL_RTX + && (prev_set = single_set (prev)) + != NULL_RTX + && REG_P (SET_DEST (set)) + && REG_P (SET_DEST (prev_set)) + && (!reload_completed + || REGNO (SET_DEST (set)) == REGNO (SET_DEST (prev_set))); +} + /* Return true if X is register asm. */ bool |