diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d7278c09f45..aff5491eb8f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2017-11-24 Segher Boessenkool + + Backport from mainline + 2017-11-17 Segher Boessenkool + + PR rtl-optimization/82621 + * combine.c (try_combine): Do not split PARALLELs of two SETs if the + dest of one of those SETs is unused. + 2017-11-23 Oleg Endo Backport from mainline diff --git a/gcc/combine.c b/gcc/combine.c index fff1c7e7bd4..c6257f60488 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -2964,7 +2964,8 @@ try_combine (rtx_insn *i3, rtx_insn *i2, rtx_insn *i1, rtx_insn *i0, && is_parallel_of_n_reg_sets (PATTERN (i2), 2) && can_split_parallel_of_n_reg_sets (i2, 2) && !reg_used_between_p (SET_DEST (XVECEXP (PATTERN (i2), 0, 0)), i2, i3) - && !reg_used_between_p (SET_DEST (XVECEXP (PATTERN (i2), 0, 1)), i2, i3)) + && !reg_used_between_p (SET_DEST (XVECEXP (PATTERN (i2), 0, 1)), i2, i3) + && !find_reg_note (i2, REG_UNUSED, 0)) { /* If there is no I1, there is no I0 either. */ i0 = i1;