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

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),
-      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|                            |


Reply via email to