From 8cb85cde6238c71dc2d28460c1c70f132ae0a304 Mon Sep 17 00:00:00 2001
From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Date: Mon, 2 Sep 2024 19:39:36 +0200
Subject: [PATCH 05/11] Patch 58833

---
 gcc/config/sh/sh.md | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gcc/config/sh/sh.md b/gcc/config/sh/sh.md
index 7eee12ca6b8..506c9a9fd33 100644
--- a/gcc/config/sh/sh.md
+++ b/gcc/config/sh/sh.md
@@ -6255,7 +6255,8 @@
   prepare_move_operands (operands, SFmode);
   if (TARGET_SH2E)
     {
-      if (lra_in_progress)
+      if (lra_in_progress &&
+          !(REG_P (operands[0]) && REG_P (operands[1])))
 	{
 	  if (GET_CODE (operands[0]) == SCRATCH)
 	    DONE;
-- 
2.45.2

