This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] combine: Don't make an intermediate reg for assigning to sfp (PR87871)


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.

Committing.


Segher


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.

---
 gcc/combine.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gcc/combine.c b/gcc/combine.c
index dfb0b44..77eeae7 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -14993,6 +14993,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;
-- 
1.8.3.1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]