diff options
author | Andreas Krebbel <krebbel@linux.vnet.ibm.com> | 2015-12-18 10:39:52 +0000 |
---|---|---|
committer | Andreas Krebbel <krebbel@gcc.gnu.org> | 2015-12-18 10:39:52 +0000 |
commit | 3f12f020c62b9f460febb59053e312f5ff298bec (patch) | |
tree | f55e864a214a00409c29569c48fe8b164b76d5bd /gcc/ira.c | |
parent | 10148d74d8138f12423160893b4100cf7b034896 (diff) | |
download | gcc-3f12f020c62b9f460febb59053e312f5ff298bec.zip gcc-3f12f020c62b9f460febb59053e312f5ff298bec.tar.gz gcc-3f12f020c62b9f460febb59053e312f5ff298bec.tar.bz2 |
IRA: Fix % constraint modifier handling on disabled alternatives.
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
Diffstat (limited to 'gcc/ira.c')
-rw-r--r-- | gcc/ira.c | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -1800,7 +1800,13 @@ ira_setup_alts (rtx_insn *insn, HARD_REG_SET &alts) { 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++; } @@ -1831,11 +1837,7 @@ ira_setup_alts (rtx_insn *insn, HARD_REG_SET &alts) 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': |