Maybe not the most important PR in the database, but we might as well
fix and close it. Count the number of alternatives in a MATCH_SCRATCH
against the max.
Bootstrapped and tested on x86_64-linux (one testcase timed out, almost
certainly because another test went heavily into swap at one point). Ok?
Bernd
PR middle-end/21273
* gensupport.c (collect_insn_data): Look for number of alternatives
in MATCH_SCRATCH.
Index: gcc/gensupport.c
===================================================================
--- gcc/gensupport.c (revision 231532)
+++ gcc/gensupport.c (working copy)
@@ -1068,12 +1068,12 @@ collect_insn_data (rtx pattern, int *pal
switch (code)
{
case MATCH_OPERAND:
- i = n_alternatives (XSTR (pattern, 2));
+ case MATCH_SCRATCH:
+ i = n_alternatives (XSTR (pattern, code == MATCH_SCRATCH ? 1 : 2));
*palt = (i > *palt ? i : *palt);
/* Fall through. */
case MATCH_OPERATOR:
- case MATCH_SCRATCH:
case MATCH_PARALLEL:
i = XINT (pattern, 0);
if (i > *pmax)