[Bug middle-end/81030] [8 Regression] ICE on valid code at -O1 (only) on x86_64-linux-gnu: verify_flow_info failed

2017-10-11 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81030

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #12 from Jakub Jelinek  ---
I assume yes.

[Bug middle-end/81030] [8 Regression] ICE on valid code at -O1 (only) on x86_64-linux-gnu: verify_flow_info failed

2017-07-23 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81030

Arseny Solokha  changed:

   What|Removed |Added

 CC||asolokha at gmx dot com

--- Comment #11 from Arseny Solokha  ---
Should this PR be closed now?

[Bug middle-end/81030] [8 Regression] ICE on valid code at -O1 (only) on x86_64-linux-gnu: verify_flow_info failed

2017-07-20 Thread hubicka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81030

--- Comment #10 from Jan Hubicka  ---
Author: hubicka
Date: Thu Jul 20 11:27:31 2017
New Revision: 250383

URL: https://gcc.gnu.org/viewcvs?rev=250383=gcc=rev
Log:

PR middle-end/81030
* cfgbuild.c (find_many_sub_basic_blocks): Update REG_BR_PROB note
when gimple level profile disagrees with what RTL expander did.
* gcc.dg/pr81030.c: New test.

Added:
trunk/gcc/testsuite/gcc.dg/pr81030.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/cfgbuild.c
trunk/gcc/testsuite/ChangeLog

[Bug middle-end/81030] [8 Regression] ICE on valid code at -O1 (only) on x86_64-linux-gnu: verify_flow_info failed

2017-07-17 Thread vries at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81030

Tom de Vries  changed:

   What|Removed |Added

   Keywords||patch

--- Comment #9 from Tom de Vries  ---
https://gcc.gnu.org/ml/gcc-patches/2017-07/msg00963.html

[Bug middle-end/81030] [8 Regression] ICE on valid code at -O1 (only) on x86_64-linux-gnu: verify_flow_info failed

2017-07-16 Thread vries at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81030

Tom de Vries  changed:

   What|Removed |Added

 CC||babokin at gmail dot com

--- Comment #8 from Tom de Vries  ---
*** Bug 81332 has been marked as a duplicate of this bug. ***

[Bug middle-end/81030] [8 Regression] ICE on valid code at -O1 (only) on x86_64-linux-gnu: verify_flow_info failed

2017-07-16 Thread vries at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81030

--- Comment #7 from Tom de Vries  ---
(In reply to Tom de Vries from comment #6)
> Commenting out the else clause gets rid of the ICE.

Same for PR81332, marking it duplicate.

[Bug middle-end/81030] [8 Regression] ICE on valid code at -O1 (only) on x86_64-linux-gnu: verify_flow_info failed

2017-07-15 Thread vries at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81030

--- Comment #6 from Tom de Vries  ---
There's a call to compute_outgoing_frequencies in find_many_sub_basic_blocks.

But it's not reached for bb4, because STATE(bb4) == BLOCK_TO_SPLIT, and we
trigger the continue here:
...
else
  /* If nothing changed, there is no need to create new BBs.  */
  if (EDGE_COUNT (bb->succs) == n_succs[bb->index])
continue;

compute_outgoing_frequencies (bb);
  }
...

Commenting out the else clause gets rid of the ICE.

[Bug middle-end/81030] [8 Regression] ICE on valid code at -O1 (only) on x86_64-linux-gnu: verify_flow_info failed

2017-07-14 Thread vries at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81030

Tom de Vries  changed:

   What|Removed |Added

 CC||vries at gcc dot gnu.org

--- Comment #5 from Tom de Vries  ---
When we expand this jump:
...
  _23 = _21 | _22;
  if (_23 != 0)
goto ; [73.27%] [count: INV]
  else
goto ; [26.73%] [count: INV]
;;succ:   7 [73.3% (guessed)]  (TRUE_VALUE,EXECUTABLE)
;;6 [26.7% (guessed)]  (FALSE_VALUE,EXECUTABLE)
...


we hit the TRUTH_ORIF_EXPR handling in do_jump_1:
...
case TRUTH_ANDIF_EXPR:
  {
/* Spread the probability that the expression is false evenly between
   the two conditions. So the first condition is false half the total
   probability of being false. The second condition is false the other
   half of the total probability of being false, so its jump has a
false
   probability of half the total, relative to the probability we
   reached it (i.e. the first condition was true).  */
profile_probability op0_prob = profile_probability::uninitialized ();
profile_probability op1_prob = profile_probability::uninitialized ();
if (prob.initialized_p ())
  {
profile_probability false_prob = prob.invert ();
profile_probability op0_false_prob = false_prob.apply_scale (1, 2);
profile_probability op1_false_prob = false_prob.apply_scale (1, 2)
/ op0_false_prob.invert ();
/* Get the probability that each jump below is true.  */
op0_prob = op0_false_prob.invert ();
op1_prob = op1_false_prob.invert ();
  }
if (if_false_label == NULL)
  {
drop_through_label = gen_label_rtx ();
do_jump (op0, drop_through_label, NULL, op0_prob);
do_jump (op1, NULL, if_true_label, op1_prob);
  }
else
  {
do_jump (op0, if_false_label, NULL, op0_prob);
do_jump (op1, if_false_label, if_true_label, op1_prob);
  }
break;
  }
...

The true edge to bb7 with probability 7327 is split into two probabilities, as
the comment explains:
...
(gdb) p op0_prob
$5 = {static n_bits = 30, static max_probability = 1, 
  static uninitialized_probability = 1073741823, m_val = 3664, m_quality =
profile_guessed}
(gdb) p op1_prob
$6 = {static n_bits = 30, static max_probability = 1, 
  static uninitialized_probability = 1073741823, m_val = 5783, m_quality =
profile_guessed}
...


The assert we run into is:

test2.c:26:1: error: verify_flow_info: REG_BR_PROB does not match cfg 3664 7327
...
The assert complains that the first do_jump generates a branch with REG_BR_PROB
3664, while the corresponding edge remains at 7327.

In other words:
...
(jump_insn 15 14 18 5 (set (pc)
(if_then_else (ne (reg:CCZ 17 flags)
(const_int 0 [0]))
(label_ref:DI 32)
(pc))) "test2.c":20 617 {*jcc_1}
 (int_list:REG_BR_PROB 3664 (nil))
 -> 32)
;;succ:   10 [73.3% (guessed)]
;;6 [26.7% (guessed)]  (FALLTHRU)
...

[Bug middle-end/81030] [8 Regression] ICE on valid code at -O1 (only) on x86_64-linux-gnu: verify_flow_info failed

2017-06-21 Thread dcb314 at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81030

--- Comment #4 from David Binderman  ---
(In reply to David Binderman from comment #3)
> (In reply to David Binderman from comment #2)
> > Bug seems to occur between gcc revision 248932 and 249008.
> 
> Between revisions 248932 and 248951.

Between revisions 248942 and 248947.

[Bug middle-end/81030] [8 Regression] ICE on valid code at -O1 (only) on x86_64-linux-gnu: verify_flow_info failed

2017-06-21 Thread dcb314 at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81030

--- Comment #3 from David Binderman  ---
(In reply to David Binderman from comment #2)
> Bug seems to occur between gcc revision 248932 and 249008.

Between revisions 248932 and 248951.

[Bug middle-end/81030] [8 Regression] ICE on valid code at -O1 (only) on x86_64-linux-gnu: verify_flow_info failed

2017-06-20 Thread dcb314 at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81030

David Binderman  changed:

   What|Removed |Added

 CC||dcb314 at hotmail dot com

--- Comment #2 from David Binderman  ---
(In reply to Richard Biener from comment #1)
> Confirmed.  Sounds like fallout of honzas reorg.

Bug seems to occur between gcc revision 248932 and 249008.

[Bug middle-end/81030] [8 Regression] ICE on valid code at -O1 (only) on x86_64-linux-gnu: verify_flow_info failed

2017-06-09 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81030

Richard Biener  changed:

   What|Removed |Added

 Target||x86_64-*-*, i?86-*-*
   Priority|P3  |P1
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-06-09
 CC||hubicka at gcc dot gnu.org
Version|unknown |8.0
   Target Milestone|--- |8.0
Summary|ICE on valid code at -O1|[8 Regression] ICE on valid
   |(only) on x86_64-linux-gnu: |code at -O1 (only) on
   |verify_flow_info failed |x86_64-linux-gnu:
   ||verify_flow_info failed
 Ever confirmed|0   |1

--- Comment #1 from Richard Biener  ---
Confirmed.  Sounds like fallout of honzas reorg.