[Bug target/59605] [4.9 Regression] error: wrong number of branch edges after unconditional jump in bb 11

2014-01-02 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59605

Jakub Jelinek jakub at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||jakub at gcc dot gnu.org
 Resolution|--- |FIXED

--- Comment #6 from Jakub Jelinek jakub at gcc dot gnu.org ---
Fixed.


[Bug target/59605] [4.9 Regression] error: wrong number of branch edges after unconditional jump in bb 11

2013-12-30 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59605

--- Comment #5 from Jakub Jelinek jakub at gcc dot gnu.org ---
Author: jakub
Date: Mon Dec 30 08:48:25 2013
New Revision: 206242

URL: http://gcc.gnu.org/viewcvs?rev=206242root=gccview=rev
Log:
PR target/59605
* config/i386/i386.c (ix86_expand_set_or_movmem): Create
jump_around_label only if it doesn't exist.

* gcc.dg/pr59605.c: New test.

Added:
trunk/gcc/testsuite/gcc.dg/pr59605.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/i386.c
trunk/gcc/testsuite/ChangeLog


[Bug target/59605] [4.9 Regression] error: wrong number of branch edges after unconditional jump in bb 11

2013-12-26 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59605

H.J. Lu hjl.tools at gmail dot com changed:

   What|Removed |Added

 CC||hubicka at ucw dot cz
  Component|middle-end  |target
   Target Milestone|--- |4.9.0

--- Comment #1 from H.J. Lu hjl.tools at gmail dot com ---
It is caused by r203937.


[Bug target/59605] [4.9 Regression] error: wrong number of branch edges after unconditional jump in bb 11

2013-12-26 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59605

H.J. Lu hjl.tools at gmail dot com changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2013-12-26
 Ever confirmed|0   |1

--- Comment #2 from H.J. Lu hjl.tools at gmail dot com ---
ix86_expand_set_or_movmem has

  rtx jump_around_label = NULL;

 /* Misaligned move sequences handles both prologues and epilogues at once.
 Default code generation results in smaller code for large alignments and
 also avoids redundant job when sizes are known precisely.  */
  if (misaligned_prologue_used)
{
  /* Misaligned move prologue handled small blocks by itself.  */
  expand_set_or_movmem_prologue_epilogue_by_misaligned_moves
   (dst, src, destreg, srcreg,
move_mode, promoted_val, vec_promoted_val,
count_exp,
jump_around_label,
desired_align  align
? MAX (desired_align, epilogue_size_needed) : epilogue_size_needed,
desired_align, align, min_size, dynamic_check, issetmem);
  if (!issetmem)
src = change_address (src, BLKmode, srcreg);
...
  else
{   
  rtx hot_label = gen_label_rtx ();
  jump_around_label = gen_label_rtx ();
^
When jump_around_label != NULL, the previous jump_around_label
is lost.
  emit_cmp_and_jump_insns (count_exp, GEN_INT (dynamic_check - 1),
   LEU, 0, GET_MODE (count_exp), 1, hot_label);
  predict_jump (REG_BR_PROB_BASE * 90 / 100);
  if (issetmem)
set_storage_via_libcall (dst, count_exp, val_exp, false);
  else
emit_block_move_via_libcall (dst, src, count_exp, false);
  emit_jump (jump_around_label);
  emit_label (hot_label);
}


[Bug target/59605] [4.9 Regression] error: wrong number of branch edges after unconditional jump in bb 11

2013-12-26 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59605

--- Comment #3 from H.J. Lu hjl.tools at gmail dot com ---
Does this

---
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 0cf0a9d..07f9a86 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -24015,7 +24015,8 @@ ix86_expand_set_or_movmem (rtx dst, rtx src, rtx
count_exp, rtx val_exp,
   else
 {
   rtx hot_label = gen_label_rtx ();
-  jump_around_label = gen_label_rtx ();
+  if (jump_around_label == NULL_RTX)
+jump_around_label = gen_label_rtx ();
   emit_cmp_and_jump_insns (count_exp, GEN_INT (dynamic_check - 1),
LEU, 0, GET_MODE (count_exp), 1, hot_label);
   predict_jump (REG_BR_PROB_BASE * 90 / 100);
---

make any senses?


[Bug target/59605] [4.9 Regression] error: wrong number of branch edges after unconditional jump in bb 11

2013-12-26 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59605

--- Comment #4 from H.J. Lu hjl.tools at gmail dot com ---
A patch is posted at

http://gcc.gnu.org/ml/gcc-patches/2013-12/msg01907.html