re PR rtl-optimization/80343 (ICE in extract_constrain_insn, at recog.c:2213 (error: insn does not satisfy its constraints))

2017-04-13  Vladimir Makarov  <vmakarov@redhat.com>

	PR rtl-optimization/80343
	* lra-remat.c (update_scratch_ops): Assign original hard reg to
	new scratch pseudo.

2017-04-13  Vladimir Makarov  <vmakarov@redhat.com>

	PR rtl-optimization/80343
	* gcc.target/powerpc/pr80343.c: New.

From-SVN: r246914
This commit is contained in:
Vladimir Makarov 2017-04-13 18:08:51 +00:00 committed by Vladimir Makarov
parent abac4c3400
commit bc04239603
4 changed files with 70 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2017-04-13 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/80343
* lra-remat.c (update_scratch_ops): Assign original hard reg to
new scratch pseudo.
2017-04-13 Denis Khalikov <d.khalikov@partner.samsung.com>
PR sanitizer/80414

View File

@ -1024,6 +1024,7 @@ get_hard_regs (struct lra_insn_reg *reg, int &nregs)
static void
update_scratch_ops (rtx_insn *remat_insn)
{
int hard_regno;
lra_insn_recog_data_t id = lra_get_insn_recog_data (remat_insn);
struct lra_static_insn_data *static_id = id->insn_static_data;
for (int i = 0; i < static_id->n_operands; i++)
@ -1034,9 +1035,17 @@ update_scratch_ops (rtx_insn *remat_insn)
int regno = REGNO (*loc);
if (! lra_former_scratch_p (regno))
continue;
hard_regno = reg_renumber[regno];
*loc = lra_create_new_reg (GET_MODE (*loc), *loc,
lra_get_allocno_class (regno),
"scratch pseudo copy");
if (hard_regno >= 0)
{
reg_renumber[REGNO (*loc)] = hard_regno;
if (lra_dump_file)
fprintf (lra_dump_file, " Assigning the same %d to r%d\n",
REGNO (*loc), hard_regno);
}
lra_register_new_scratch_op (remat_insn, i);
}

View File

@ -1,3 +1,8 @@
2017-04-13 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/80343
* gcc.target/powerpc/pr80343.c: New.
2017-04-13 Denis Khalikov <d.khalikov@partner.samsung.com>
PR sanitizer/80414

View File

@ -0,0 +1,50 @@
/* { dg-do compile { target powerpc-*-*spe } } */
/* { dg-options "-O2 -ftracer -fPIC" } */
long long int vi, ls;
int wq, oa, to, fv;
signed char zo;
long long int
ai (long long int ip, long long int jc, int gt)
{
ip /= 3;
jc += ip;
if (ip != 0)
vi = 0;
vi += ls;
if (wq != oa)
{
int tz;
for (tz = 0; tz < 32; ++tz)
zo -= wq & gt;
if ((gt & 5) > oa)
{
zo += gt;
fv += zo + to;
}
if (gt != 0)
oa = 0;
if (fv != 0)
{
vi += wq;
ls += ip;
jc += (vi != 0) ? ip : ls;
}
while (tz != 0)
{
zo = wq;
tz = zo;
}
++to;
wq = ip;
}
return jc;
}