This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug rtl-optimization/45352] ICE: in reset_sched_cycles_in_current_ebb, at sel-sched.c:7058



------- Comment #4 from abel at gcc dot gnu dot org  2010-09-22 14:29 -------
Confirmed.

All testcases except the first with the -O3 flags are fixed by the below patch.
 The bug that the patch "fixes" is actually PR37360 all over again but in
sel-sched instead of haifa.  We have the process of resetting sched-cycles for
insns (that may be wrong because of pipelining) for the targets that may use
them in their sched_finish hook.  (E.g. ia64 does bundling in this hook.)  The
process is just scheduling insns in the same order as they are already, calling
all the necessary hooks and massaging DFA so we get the correct cycles from it.
 The assert triggered means that the selective scheduling and this resetting
process got out of sync.  And this happened guess why, because (for the last
test I had actually analyzed) the target claims issue_rate of 3 while issuing 4
insns on the same cycle!  I'm actually surprised that the GCC target lying to
the backend may still surprise me, but I guess ten more years of GCC work would
do the trick.

I will be looking at the remaining failure shortly.

diff --git a/gcc/sel-sched.c b/gcc/sel-sched.c
index 041c471..aff7eae 100644
--- a/gcc/sel-sched.c
+++ b/gcc/sel-sched.c
@@ -4402,7 +4402,8 @@ find_best_expr (av_set_t *av_vliw_ptr, blist_t bnds,
fence_t fence,
     {
       can_issue_more = invoke_aftermath_hooks (fence, EXPR_INSN_RTX (best),
                                                can_issue_more);
-      if (can_issue_more == 0)
+      if (targetm.sched.variable_issue
+         && can_issue_more == 0)
         *pneed_stall = 1;
     }


-- 

abel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |abel at gcc dot gnu dot org
         AssignedTo|unassigned at gcc dot gnu   |abel at gcc dot gnu dot org
                   |dot org                     |
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2010-09-22 14:29:22
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45352


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]