aboutsummaryrefslogtreecommitdiff
path: root/gcc/combine.c
diff options
context:
space:
mode:
authorGiuliano Belinassi <giuliano.belinassi@usp.br>2020-08-22 17:43:43 -0300
committerGiuliano Belinassi <giuliano.belinassi@usp.br>2020-08-22 17:43:43 -0300
commita926878ddbd5a98b272c22171ce58663fc04c3e0 (patch)
tree86af256e5d9a9c06263c00adc90e5fe348008c43 /gcc/combine.c
parent542730f087133690b47e036dfd43eb0db8a650ce (diff)
parent07cbaed8ba7d1b6e4ab3a9f44175502a4e1ecdb1 (diff)
downloadgcc-devel/autopar_devel.zip
gcc-devel/autopar_devel.tar.gz
gcc-devel/autopar_devel.tar.bz2
Merge branch 'autopar_rebase2' into autopar_develdevel/autopar_devel
Quickly commit changes in the rebase branch.
Diffstat (limited to 'gcc/combine.c')
-rw-r--r--gcc/combine.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/gcc/combine.c b/gcc/combine.c
index 4c324f3..4fee114 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -1485,6 +1485,7 @@ combine_instructions (rtx_insn *f, unsigned int nregs)
if ((set = single_set (temp)) != 0
&& (note = find_reg_equal_equiv_note (temp)) != 0
&& (note = XEXP (note, 0), GET_CODE (note)) != EXPR_LIST
+ && ! side_effects_p (SET_SRC (set))
/* Avoid using a register that may already been marked
dead by an earlier instruction. */
&& ! unmentioned_reg_p (note, SET_SRC (set))
@@ -2458,7 +2459,7 @@ static void
adjust_for_new_dest (rtx_insn *insn)
{
/* For notes, be conservative and simply remove them. */
- remove_reg_equal_equiv_notes (insn);
+ remove_reg_equal_equiv_notes (insn, true);
/* The new insn will have a destination that was previously the destination
of an insn just above it. Call distribute_links to make a LOG_LINK from
@@ -2623,15 +2624,16 @@ can_split_parallel_of_n_reg_sets (rtx_insn *insn, int n)
return true;
}
-/* Return whether X is just a single set, with the source
+/* Return whether X is just a single_set, with the source
a general_operand. */
static bool
-is_just_move (rtx x)
+is_just_move (rtx_insn *x)
{
- if (INSN_P (x))
- x = PATTERN (x);
+ rtx set = single_set (x);
+ if (!set)
+ return false;
- return (GET_CODE (x) == SET && general_operand (SET_SRC (x), VOIDmode));
+ return general_operand (SET_SRC (set), VOIDmode);
}
/* Callback function to count autoincs. */