This is the mail archive of the gcc-patches@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]

define_cond_exec tweek


By recording the last seen number of alternatives, we run into 
problems with patterns like

(define_insn "*call_internal"
  [(call (match_operand:QI 0 "call_operand" "R,S")
         (match_operand 1 "" ""))
   (use (match_operand 2 "" ""))
   (clobber (match_operand 3 "" "=d,d"))]
  ""

in which, because of the order of traversal, we wind up recording
zero alternatives.  Which means we don't replicate the constraint
for the cond_exec predicate properly, which leads to inexplicable
error messages from genoutput.

Seen on d30v.


r~


        * gensupport.c (collect_insn_data): Record the maximum number
        of alternatives, not the last seen.

Index: gensupport.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/gensupport.c,v
retrieving revision 1.8
diff -c -p -d -r1.8 gensupport.c
*** gensupport.c	2000/05/20 19:45:33	1.8
--- gensupport.c	2000/05/27 20:02:34
*************** collect_insn_data (pattern, palt, pmax)
*** 415,421 ****
    switch (code)
      {
      case MATCH_OPERAND:
!       *palt = n_alternatives (XSTR (pattern, 2));
        /* FALLTHRU */
  
      case MATCH_OPERATOR:
--- 415,422 ----
    switch (code)
      {
      case MATCH_OPERAND:
!       i = n_alternatives (XSTR (pattern, 2));
!       *palt = (i > *palt ? i : *palt);
        /* FALLTHRU */
  
      case MATCH_OPERATOR:

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