From: Segher Boessenkool Date: Sat, 10 Nov 2018 23:12:48 +0000 (+0100) Subject: combine: More make_more_copies X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=16ac6fa5a0537d201abb269ccee396ccb407a770;p=gcc.git combine: More make_more_copies This makes make_more_copies do what its documentation says, that is, only make an intermediate pseudo if copying to a pseudo. This regressed generated code quality when we didn't keep the original notes that were on the copy, but since r265582 we do, and only allowing pseudos now is a win. It also simplifies the code. * combine.c (make_more_copies): Only make an intermediate copy if the dest of a move is a pseudo. From-SVN: r266004 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6b30ada08d5..51c7e42c810 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2018-11-10 Segher Boessenkool + + * combine.c (make_more_copies): Only make an intermediate copy if the + dest of a move is a pseudo. + 2018-11-09 Maya Rashish PR target/87221 diff --git a/gcc/combine.c b/gcc/combine.c index 93bd3da26d7..945eca3da5a 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -14956,12 +14956,11 @@ make_more_copies (void) rtx set = single_set (insn); if (!set) continue; + rtx dest = SET_DEST (set); - if (dest == pc_rtx) - continue; - /* See PR87871. */ - if (dest == frame_pointer_rtx) - continue; + if (!(REG_P (dest) && !HARD_REGISTER_P (dest))) + continue; + rtx src = SET_SRC (set); if (!(REG_P (src) && HARD_REGISTER_P (src))) continue;