diff mbox series

[SH,committed] Fix PR 81485

Message ID 1516539782.13888.14.camel@t-online.de
State New
Headers show
Series [SH,committed] Fix PR 81485 | expand

Commit Message

Oleg Endo Jan. 21, 2018, 1:03 p.m. UTC
Hi,

The following fixes PRĀ 81485.
Tested with make -k check RUNTESTFLAGS="--target_board=sh-sim\{-m2/-
ml,-m2/-mb,-m2a/-mb,-m4/-ml,-m4/-mb,-m4a/-ml,-m4a/-mb}"

Committed as r256930.

Cheers,
Oleg

gcc/ChangeLog:
	PR target/81485
	* config/sh/sh-protos.h (sh_find_set_of_reg): Remove assert.
diff mbox series

Patch

Index: gcc/config/sh/sh-protos.h
===================================================================
--- gcc/config/sh/sh-protos.h	(revision 256929)
+++ gcc/config/sh/sh-protos.h	(working copy)
@@ -228,9 +228,13 @@ 
 	}
     }
 
-  if (result.set_src != NULL)
-    gcc_assert (result.insn != NULL && result.set_rtx != NULL);
-
+  /* If the searched reg is found inside a (mem (post_inc:SI (reg))), set_of
+     will return NULL and set_rtx will be NULL.
+     In this case report a 'not found'.  result.insn will always be non-null
+     at this point, so no need to check it.  */
+  if (result.set_src != NULL && result.set_rtx == NULL)
+    result.set_src = NULL;
+ 
   return result;
 }