From: Segher Boessenkool Date: Wed, 24 Oct 2018 22:34:40 +0000 (+0200) Subject: combine: Don't do make_more_copies for dest PC (PR87720) X-Git-Tag: basepoints/gcc-10~3527 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b8ac95761a5c0a902fa2547e9345febf26713bf5;p=thirdparty%2Fgcc.git combine: Don't do make_more_copies for dest PC (PR87720) Jumps are written in RTL as moves to PC. But the latter has no mode, so we shouldn't try to use it. Since the optimization this routine does does not really help for jumps at all, let's just skip it. PR rtl-optimization/87720 * combine.c (make_more_copies): Skip if the dest is pc_rtx. From-SVN: r265474 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fdfca8ba6bc3..da93f6f88676 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2018-10-24 Segher Boessenkool + + PR rtl-optimization/87720 + * combine.c (make_more_copies): Skip if the dest is pc_rtx. + 2018-10-24 Alexandre Oliva * gimple-ssa-isolate-paths.c diff --git a/gcc/combine.c b/gcc/combine.c index 8ec6809c05c1..2b9332893922 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -14958,6 +14958,8 @@ make_more_copies (void) continue; rtx src = SET_SRC (set); rtx dest = SET_DEST (set); + if (dest == pc_rtx) + continue; if (GET_CODE (src) == SUBREG) src = SUBREG_REG (src); if (!(REG_P (src) && HARD_REGISTER_P (src)))