summaryrefslogtreecommitdiff
path: root/gcc/ira.c
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2014-05-30 07:35:47 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2014-05-30 07:35:47 +0000
commite0d2c8640c504ecd83291c4e008cb91d17df3e0d (patch)
tree355ba26239f6abd8173627db18edbe081b68b586 /gcc/ira.c
parent55068e5aa953862df87280d92511d9b0b6252fa3 (diff)
downloadgcc-e0d2c8640c504ecd83291c4e008cb91d17df3e0d.tar.gz
gcc/
* ira.c (ira_get_dup_out_num): Check for output operands at the start of the loop. Handle cases where an included alternative follows an excluded one. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@211072 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ira.c')
-rw-r--r--gcc/ira.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/gcc/ira.c b/gcc/ira.c
index 26d017e0820..eebd4100bc3 100644
--- a/gcc/ira.c
+++ b/gcc/ira.c
@@ -1979,33 +1979,33 @@ ira_get_dup_out_num (int op_num, HARD_REG_SET &alts)
if (op_num < 0 || recog_data.n_alternatives == 0)
return -1;
- use_commut_op_p = false;
+ /* We should find duplications only for input operands. */
+ if (recog_data.operand_type[op_num] != OP_IN)
+ return -1;
str = recog_data.constraints[op_num];
+ use_commut_op_p = false;
for (;;)
{
#ifdef EXTRA_CONSTRAINT_STR
op = recog_data.operand[op_num];
#endif
- for (ignore_p = false, original = -1, curr_alt = 0;;)
+ for (curr_alt = 0, ignore_p = !TEST_HARD_REG_BIT (alts, curr_alt),
+ original = -1;;)
{
c = *str;
if (c == '\0')
break;
- if (c == '#' || !TEST_HARD_REG_BIT (alts, curr_alt))
+ if (c == '#')
ignore_p = true;
else if (c == ',')
{
curr_alt++;
- ignore_p = false;
+ ignore_p = !TEST_HARD_REG_BIT (alts, curr_alt);
}
else if (! ignore_p)
switch (c)
{
- /* We should find duplications only for input operands. */
- case '=':
- case '+':
- goto fail;
case 'X':
case 'p':
case 'g':