gcc/ChangeLog:
2015-12-18  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
	* ira.c (ira_setup_alts): Move the scan for commutative modifier
	to the first loop to make it work even with disabled alternatives.
From-SVN: r231814
+2015-12-18  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
+
+       * ira.c (ira_setup_alts): Move the scan for commutative modifier
+       to the first loop to make it work even with disabled alternatives.
+
 2015-12-18  Dominik Vogt  <vogt@linux.vnet.ibm.com>
 
        * config/s390/s390.c (s390_init_frame_layout): Try r4 to r2 for the
 
            {
              insn_constraints[nop * recog_data.n_alternatives + nalt] = p;
              while (*p && *p != ',')
-               p++;
+               {
+                 /* We only support one commutative marker, the first
+                    one.  We already set commutative above.  */
+                 if (*p == '%' && commutative < 0)
+                   commutative = nop;
+                 p++;
+               }
              if (*p)
                p++;
            }
                    break;
                  
                  case '%':
-                   /* We only support one commutative marker, the
-                      first one.  We already set commutative
-                      above.  */
-                   if (commutative < 0)
-                     commutative = nop;
+                   /* The commutative modifier is handled above.  */
                    break;
 
                  case '0':  case '1':  case '2':  case '3':  case '4':