aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSegher Boessenkool <segher@kernel.crashing.org>2018-10-24 22:34:40 +0000
committerSegher Boessenkool <segher@kernel.crashing.org>2018-10-24 22:34:40 +0000
commiteac902c18cddf083faa4ed5020bcedab6d4f190a (patch)
treea48e19391c14d046d4639b73ddd54954d831c418
parentc0730d018cd65c9d3b6feaaf9c94a7d8279f58c4 (diff)
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. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@265474 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/combine.c2
2 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index fdfca8ba6bc..da93f6f8867 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2018-10-24 Segher Boessenkool <segher@kernel.crashing.org>
+
+ PR rtl-optimization/87720
+ * combine.c (make_more_copies): Skip if the dest is pc_rtx.
+
2018-10-24 Alexandre Oliva <aoliva@redhat.com>
* gimple-ssa-isolate-paths.c
diff --git a/gcc/combine.c b/gcc/combine.c
index 8ec6809c05c..2b933289392 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)))