combine: Don't make an intermediate reg for assigning to sfp (PR87871)
authorSegher Boessenkool <segher@kernel.crashing.org>
Mon, 5 Nov 2018 21:18:22 +0000 (22:18 +0100)
committerSegher Boessenkool <segher@gcc.gnu.org>
Mon, 5 Nov 2018 21:18:22 +0000 (22:18 +0100)
The code with an intermediate register is perfectly fine, but LRA
apparently cannot handle the resulting code, or perhaps something else
is wrong.  In either case, making an extra temporary will not likely
help here, so let's just skip it.

PR rtl-optimization/87871
* combine.c (make_more_copies): Skip if dest is frame_pointer_rtx.

From-SVN: r265821

gcc/ChangeLog
gcc/combine.c

index 00273e5..0e4794c 100644 (file)
@@ -1,3 +1,8 @@
+2018-11-05  Segher Boessenkool  <segher@kernel.crashing.org>
+
+       PR rtl-optimization/87871
+       * combine.c (make_more_copies): Skip if dest is frame_pointer_rtx.
+
 2018-11-05  Paul Koning  <ni1d@arrl.net>
 
        * doc/sourcebuild.texi (target attributes): Document new "inf"
index 3e20428..93bd3da 100644 (file)
@@ -14959,6 +14959,9 @@ make_more_copies (void)
          rtx dest = SET_DEST (set);
          if (dest == pc_rtx)
            continue;
+         /* See PR87871.  */
+         if (dest == frame_pointer_rtx)
+           continue;
          rtx src = SET_SRC (set);
          if (!(REG_P (src) && HARD_REGISTER_P (src)))
            continue;