[Bug rtl-optimization/79780] [7 Regression] ICE in rtl_verify_bb_insns, at cfgrtl.c:2661 (error: flow control insn inside a basic block)

2017-03-03 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79780

Jakub Jelinek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #5 from Jakub Jelinek  ---
Fixed.

[Bug rtl-optimization/79780] [7 Regression] ICE in rtl_verify_bb_insns, at cfgrtl.c:2661 (error: flow control insn inside a basic block)

2017-03-02 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79780

--- Comment #4 from Jakub Jelinek  ---
Author: jakub
Date: Thu Mar  2 16:02:37 2017
New Revision: 245843

URL: https://gcc.gnu.org/viewcvs?rev=245843=gcc=rev
Log:
PR rtl-optimization/79780
* cprop.c (one_cprop_pass): When second and further conditional trap
in a single basic block is turned into an unconditional trap, turn it
into a deleted note to avoid RTL verification failures.

* gcc.c-torture/compile/pr79780.c: New test.

Added:
trunk/gcc/testsuite/gcc.c-torture/compile/pr79780.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/cprop.c
trunk/gcc/testsuite/ChangeLog

[Bug rtl-optimization/79780] [7 Regression] ICE in rtl_verify_bb_insns, at cfgrtl.c:2661 (error: flow control insn inside a basic block)

2017-03-01 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79780

Jakub Jelinek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2017-03-01
   Assignee|unassigned at gcc dot gnu.org  |jakub at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #3 from Jakub Jelinek  ---
Created attachment 40866
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40866=edit
gcc7-pr79780.patch

Patch I'm going to bootstrap/regtest on powerpc64-linux.

[Bug rtl-optimization/79780] [7 Regression] ICE in rtl_verify_bb_insns, at cfgrtl.c:2661 (error: flow control insn inside a basic block)

2017-03-01 Thread bernds at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79780

Bernd Schmidt  changed:

   What|Removed |Added

 CC||bernds at gcc dot gnu.org

--- Comment #2 from Bernd Schmidt  ---
So the verification triggers before the dead blocks get removed?

I think I'd keep the seen_uncond_trap and just delete_insn inside the if
statement if it's already true.

[Bug rtl-optimization/79780] [7 Regression] ICE in rtl_verify_bb_insns, at cfgrtl.c:2661 (error: flow control insn inside a basic block)

2017-03-01 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79780

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek  ---
--- cprop.c.jj2 2017-02-13 22:55:30.0 +0100
+++ cprop.c 2017-03-01 17:36:36.123518656 +0100
@@ -1829,7 +1829,6 @@ one_cprop_pass (void)
  EXIT_BLOCK_PTR_FOR_FN (cfun),
  next_bb)
{
- bool seen_uncond_trap = false;
  rtx_insn *insn;

  /* Reset tables used to keep track of what's still valid [since
@@ -1852,13 +1851,10 @@ one_cprop_pass (void)
if (! NOTE_P (insn) && ! insn->deleted ())
  mark_oprs_set (insn);

-   if (!was_uncond_trap && !seen_uncond_trap
+   if (!was_uncond_trap
&& GET_CODE (PATTERN (insn)) == TRAP_IF
&& XEXP (PATTERN (insn), 0) == const1_rtx)
- {
-   seen_uncond_trap = true;
-   uncond_traps.safe_push (insn);
- }
+ uncond_traps.safe_push (insn);
  }
}

fixes the ICE for me.  I bet the reason for the seen_uncond_trap is that
further splitting of dead code doesn't buy us much.  So another alternative
would be to simply delete the second and further unconditional trap instead of
splitting it.

[Bug rtl-optimization/79780] [7 Regression] ICE in rtl_verify_bb_insns, at cfgrtl.c:2661 (error: flow control insn inside a basic block)

2017-03-01 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79780

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |7.0