[Bug rtl-optimization/78626] [7 Regression] ICE in rtl_verify_bb_insns, at cfgrtl.c:2656 (error: flow control insn inside a basic block)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78626 Jeffrey A. Law changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution|--- |FIXED --- Comment #16 from Jeffrey A. Law --- Fixed by Bernd's patch I installed on the trunk.
[Bug rtl-optimization/78626] [7 Regression] ICE in rtl_verify_bb_insns, at cfgrtl.c:2656 (error: flow control insn inside a basic block)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78626 --- Comment #15 from Jeffrey A. Law --- Author: law Date: Sat Jan 14 16:52:18 2017 New Revision: 244467 URL: https://gcc.gnu.org/viewcvs?rev=244467&root=gcc&view=rev Log: PR rtl-optimization/78626 PR rtl-optimization/78727 * cprop.c (one_cprop_pass): Collect unconditional traps in the middle of a block, and split such blocks after everything else is finished. PR rtl-optimization/78626 PR rtl-optimization/78727 * gcc.dg/torture/pr78626.c: New test. * gcc.dg/torture/pr78727.c: New test. Added: trunk/gcc/testsuite/gcc.dg/torture/pr78626.c trunk/gcc/testsuite/gcc.dg/torture/pr78727.c Modified: trunk/gcc/ChangeLog trunk/gcc/cprop.c trunk/gcc/testsuite/ChangeLog
[Bug rtl-optimization/78626] [7 Regression] ICE in rtl_verify_bb_insns, at cfgrtl.c:2656 (error: flow control insn inside a basic block)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78626 Jeffrey A. Law changed: What|Removed |Added CC||law at redhat dot com --- Comment #14 from Jeffrey A. Law --- Bernd is on PTO right now. I'm going to try and pick up state on this and 78727.
[Bug rtl-optimization/78626] [7 Regression] ICE in rtl_verify_bb_insns, at cfgrtl.c:2656 (error: flow control insn inside a basic block)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78626 Arseny Solokha changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|FIXED |--- --- Comment #13 from Arseny Solokha --- (In reply to Richard Biener from comment #12) > Thus fixed. The patch was posted to the mailing list[1] but never committed. [1] https://gcc.gnu.org/ml/gcc-patches/2016-12/msg01282.html
[Bug rtl-optimization/78626] [7 Regression] ICE in rtl_verify_bb_insns, at cfgrtl.c:2656 (error: flow control insn inside a basic block)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78626 Richard Biener changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #12 from Richard Biener --- Thus fixed.
[Bug rtl-optimization/78626] [7 Regression] ICE in rtl_verify_bb_insns, at cfgrtl.c:2656 (error: flow control insn inside a basic block)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78626 --- Comment #11 from Segher Boessenkool --- It is ready to be committed AFAIK; same for the related PR78727.
[Bug rtl-optimization/78626] [7 Regression] ICE in rtl_verify_bb_insns, at cfgrtl.c:2656 (error: flow control insn inside a basic block)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78626 --- Comment #10 from Arseny Solokha --- AFAICT, the patch was ACKed by Segher on December 15th (https://gcc.gnu.org/ml/gcc-patches/2016-12/msg01337.html). Is there something that still prevents it from being committed?
[Bug rtl-optimization/78626] [7 Regression] ICE in rtl_verify_bb_insns, at cfgrtl.c:2656 (error: flow control insn inside a basic block)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78626 Aldy Hernandez changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2016-12-07 CC||aldyh at gcc dot gnu.org Ever confirmed|0 |1
[Bug rtl-optimization/78626] [7 Regression] ICE in rtl_verify_bb_insns, at cfgrtl.c:2656 (error: flow control insn inside a basic block)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78626 --- Comment #9 from Bernd Schmidt --- I can't read that assembly language, but I'll take your word for it. I'm testing the patch on x86.
[Bug rtl-optimization/78626] [7 Regression] ICE in rtl_verify_bb_insns, at cfgrtl.c:2656 (error: flow control insn inside a basic block)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78626 --- Comment #8 from Segher Boessenkool --- ... and works fine, too! ms: stwu 1,-32(1) lis 9,qs@ha lwz 9,qs@l(9) twnei 9,0 .L6: b .L6 Nice :-)
[Bug rtl-optimization/78626] [7 Regression] ICE in rtl_verify_bb_insns, at cfgrtl.c:2656 (error: flow control insn inside a basic block)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78626 --- Comment #7 from Segher Boessenkool --- (In reply to Bernd Schmidt from comment #4) > Created attachment 40269 [details] > Candidate patch That looks great :-)
[Bug rtl-optimization/78626] [7 Regression] ICE in rtl_verify_bb_insns, at cfgrtl.c:2656 (error: flow control insn inside a basic block)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78626 --- Comment #6 from Arseny Solokha --- (In reply to Bernd Schmidt from comment #4) > Created attachment 40269 [details] > Candidate patch It fixes this particular issue. I didn't run regtest, though. Meanwhile, I have four additional snippets w/ the same ICE but w/ different backtrace. I'm going to file them as separate PRs tomorrow.
[Bug rtl-optimization/78626] [7 Regression] ICE in rtl_verify_bb_insns, at cfgrtl.c:2656 (error: flow control insn inside a basic block)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78626 --- Comment #5 from Segher Boessenkool --- (In reply to Bernd Schmidt from comment #3) > Not sure it's that bad really. An unconditional trap is pretty much by > definition not performance-critical. Sure, but this was prohibiting propagating anything into a *conditional* trap instruction? Or do I read that wrong.
[Bug rtl-optimization/78626] [7 Regression] ICE in rtl_verify_bb_insns, at cfgrtl.c:2656 (error: flow control insn inside a basic block)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78626 --- Comment #4 from Bernd Schmidt --- Created attachment 40269 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40269&action=edit Candidate patch
[Bug rtl-optimization/78626] [7 Regression] ICE in rtl_verify_bb_insns, at cfgrtl.c:2656 (error: flow control insn inside a basic block)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78626 --- Comment #3 from Bernd Schmidt --- Not sure it's that bad really. An unconditional trap is pretty much by definition not performance-critical. Then again, there's a possible alternate fix, which I'll attach.
[Bug rtl-optimization/78626] [7 Regression] ICE in rtl_verify_bb_insns, at cfgrtl.c:2656 (error: flow control insn inside a basic block)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78626 --- Comment #2 from Segher Boessenkool --- I have tested something similar, and it does work, but it prevents any optimisation by cprop of any trap_if, also if it would not turn into an unconditional trap. This is pretty bad :-(
[Bug rtl-optimization/78626] [7 Regression] ICE in rtl_verify_bb_insns, at cfgrtl.c:2656 (error: flow control insn inside a basic block)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78626 Bernd Schmidt changed: What|Removed |Added CC||bernds at gcc dot gnu.org, ||segher at gcc dot gnu.org --- Comment #1 from Bernd Schmidt --- This appears to happen in cprop. Would anyone like to test this on ppc? Index: cprop.c === --- cprop.c (revision 242958) +++ cprop.c (working copy) @@ -1047,6 +1047,10 @@ int changed = 0, changed_this_round; rtx note; + /* We can't convert these to unconditional traps because it would invalidate the CFG. */ + if (GET_CODE (PATTERN (insn)) == TRAP_IF) +return 0; + do { changed_this_round = 0;
[Bug rtl-optimization/78626] [7 Regression] ICE in rtl_verify_bb_insns, at cfgrtl.c:2656 (error: flow control insn inside a basic block)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78626 Richard Biener changed: What|Removed |Added Target Milestone|--- |7.0