[PR104447] LRA: Do not split non-alloc hard regs.
LRA tried to split non-allocated hard reg for reload pseudos again and again until number of assignment passes reaches the limit. The patch fixes this. gcc/ChangeLog: PR rtl-optimization/104447 * lra-constraints.cc (spill_hard_reg_in_range): Initiate ignore hard reg set by lra_no_alloc_regs. gcc/testsuite/ChangeLog: PR rtl-optimization/104447 * gcc.target/i386/pr104447.c: New.
This commit is contained in:
parent
6bbd8afee0
commit
db69f666a7
2 changed files with 15 additions and 1 deletions
|
@ -6008,7 +6008,7 @@ spill_hard_reg_in_range (int regno, enum reg_class rclass, rtx_insn *from, rtx_i
|
||||||
HARD_REG_SET ignore;
|
HARD_REG_SET ignore;
|
||||||
|
|
||||||
lra_assert (from != NULL && to != NULL);
|
lra_assert (from != NULL && to != NULL);
|
||||||
CLEAR_HARD_REG_SET (ignore);
|
ignore = lra_no_alloc_regs;
|
||||||
EXECUTE_IF_SET_IN_BITMAP (&lra_reg_info[regno].insn_bitmap, 0, uid, bi)
|
EXECUTE_IF_SET_IN_BITMAP (&lra_reg_info[regno].insn_bitmap, 0, uid, bi)
|
||||||
{
|
{
|
||||||
lra_insn_recog_data_t id = lra_insn_recog_data[uid];
|
lra_insn_recog_data_t id = lra_insn_recog_data[uid];
|
||||||
|
|
14
gcc/testsuite/gcc.target/i386/pr104447.c
Normal file
14
gcc/testsuite/gcc.target/i386/pr104447.c
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
/* { dg-do compile } */
|
||||||
|
/* { dg-options "-O2 -pg" } */
|
||||||
|
|
||||||
|
int
|
||||||
|
bar (int x)
|
||||||
|
{
|
||||||
|
asm goto ("" : : "r" (x), "r" (x + 1), "r" (x + 2), "r" (x + 3), /* { dg-error "operand has impossible constraints" } */
|
||||||
|
"r" (x + 4), "r" (x + 5), "r" (x + 6), "r" (x + 7),
|
||||||
|
"r" (x + 8), "r" (x + 9), "r" (x + 10), "r" (x + 11),
|
||||||
|
"r" (x + 12), "r" (x + 13), "r" (x + 14), "r" (x + 15),
|
||||||
|
"r" (x + 16) : : lab);
|
||||||
|
lab:
|
||||||
|
return 0;
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue