Commit 1b51df94 by Matthew Fortune Committed by Matthew Fortune

Ensure the mode used to create split registers is suppported

gcc/
	PR target/78012
	* lra-constraints.c (split_reg): Check requested split mode
	is supported by the register.

From-SVN: r245601
parent 77850e96
2017-02-20 Matthew Fortune <matthew.fortune@imgtec.com>
PR target/78012
* lra-constraints.c (split_reg): Check requested split mode
is supported by the register.
2017-02-20 Matthew Fortune <matthew.fortune@imgtec.com>
* lra-constraints.c (simplify_operand_subreg): Remove early
return false.
......
......@@ -5396,6 +5396,26 @@ split_reg (bool before_p, int original_regno, rtx_insn *insn,
}
return false;
}
/* Split_if_necessary can split hard registers used as part of a
multi-register mode but splits each register individually. The
mode used for each independent register may not be supported
so reject the split. Splitting the wider mode should theoretically
be possible but is not implemented. */
if (! HARD_REGNO_MODE_OK (hard_regno, mode))
{
if (lra_dump_file != NULL)
{
fprintf (lra_dump_file,
" Rejecting split of %d(%s): unsuitable mode %s\n",
original_regno,
reg_class_names[lra_get_allocno_class (original_regno)],
GET_MODE_NAME (mode));
fprintf
(lra_dump_file,
" ))))))))))))))))))))))))))))))))))))))))))))))))\n");
}
return false;
}
new_reg = lra_create_new_reg (mode, original_reg, rclass, "split");
reg_renumber[REGNO (new_reg)] = hard_regno;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment