public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] config/bfin/bfin.c (hwloop_optimize): Use return false instead of gcc_assert for checking jump_insn.
@ 2015-06-28 14:42 Chen Gang
  2015-06-29 20:06 ` Bernd Schmidt
  0 siblings, 1 reply; 9+ messages in thread
From: Chen Gang @ 2015-06-28 14:42 UTC (permalink / raw)
  To: Jeff Law, Richard Henderson, Bernd Schmidt, jzhang918; +Cc: gcc-patches List

For bfin looping optimization, after lsetup optimization, it can have
the correct lsetup related insns which causes gcc_assert for jump_insn.

The related bug is Bug 66620.

2015-06-28  Chen Gang  <gang.chen.5i5j@gmail.com>

	* config/bfin/bfin.c (hwloop_optimize): Use return false instead
	of gcc_assert for checking jump_insn.
---
 gcc/config/bfin/bfin.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/gcc/config/bfin/bfin.c b/gcc/config/bfin/bfin.c
index 3b4b54e..91866dd 100644
--- a/gcc/config/bfin/bfin.c
+++ b/gcc/config/bfin/bfin.c
@@ -3520,7 +3520,13 @@ hwloop_optimize (hwloop_info loop)
       if (vec_safe_length (loop->incoming) > 1
 	  || !(loop->incoming->last ()->flags & EDGE_FALLTHRU))
 	{
-	  gcc_assert (JUMP_P (insn));
+	  if (!JUMP_P (insn))
+	    {
+	      if (dump_file)
+		fprintf (dump_file, ";; loop %d lsetup may already inserted\n",
+			 loop->loop_no);
+	      return false;
+	    }
 	  insn = PREV_INSN (insn);
 	}
 
-- 
1.9.3

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-07-11 22:54 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-28 14:42 [PATCH] config/bfin/bfin.c (hwloop_optimize): Use return false instead of gcc_assert for checking jump_insn Chen Gang
2015-06-29 20:06 ` Bernd Schmidt
2015-07-01  1:04   ` Chen Gang
2015-07-01 13:52     ` Bernd Schmidt
2015-07-01 15:26       ` Chen Gang
2015-07-03  2:13         ` Chen Gang
2015-07-06 12:51           ` Bernd Schmidt
2015-07-06 22:08             ` Chen Gang
2015-07-11 22:54               ` Chen Gang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).