gensupport.c (collect_insn_data): Record the maximum number of alternatives, not...
authorRichard Henderson <rth@cygnus.com>
Sat, 27 May 2000 20:03:31 +0000 (13:03 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Sat, 27 May 2000 20:03:31 +0000 (13:03 -0700)
        * gensupport.c (collect_insn_data): Record the maximum number
        of alternatives, not the last seen.

From-SVN: r34206

gcc/ChangeLog
gcc/gensupport.c

index 99e865bcd1a6f005dd079a1301d9a07fc0cfb641..74b7cb3eb0e3e2fa73f1f89ebe7e2e0a732395d1 100644 (file)
@@ -1,5 +1,8 @@
 2000-05-27  Richard Henderson  <rth@cygnus.com>
 
+       * gensupport.c (collect_insn_data): Record the maximum number
+       of alternatives, not the last seen.
+
        * genoutput.c: Don't include errors.h.
        (struct data): Add lineno member.
        (have_error): New.
index b475523f47201b3cde4fd9d145070ac21743c380..f25b80026ebdd16f1bf7f844eb6a005970689a65 100644 (file)
@@ -415,7 +415,8 @@ collect_insn_data (pattern, palt, pmax)
   switch (code)
     {
     case MATCH_OPERAND:
-      *palt = n_alternatives (XSTR (pattern, 2));
+      i = n_alternatives (XSTR (pattern, 2));
+      *palt = (i > *palt ? i : *palt);
       /* FALLTHRU */
 
     case MATCH_OPERATOR: