Commit bae7b38c by Vladimir N. Makarov

Fix PR94185: Do not reuse insn alternative after changing memory subreg.

2020-03-16  Vladimir Makarov  <vmakarov@redhat.com>

	PR target/94185
	* lra-spills.c (remove_pseudos): Do not reuse insn alternative
	after changing memory subreg.

2020-03-16  Vladimir Makarov  <vmakarov@redhat.com>

	PR target/94185
	* g++.target/i386/pr94185.C: New test.
parent f522810d
2020-03-16 Vladimir Makarov <vmakarov@redhat.com>
PR target/94185
* lra-spills.c (remove_pseudos): Do not reuse insn alternative
after changing memory subreg.
2020-03-16 Andre Vieira <andre.simoesdiasvieira@arm.com>
Srinath Parvathaneni <srinath.parvathaneni@arm.com>
......
......@@ -427,7 +427,17 @@ remove_pseudos (rtx *loc, rtx_insn *insn)
and avoid LRA cycling in case of subreg memory reload. */
res = remove_pseudos (&SUBREG_REG (*loc), insn);
if (GET_CODE (SUBREG_REG (*loc)) == MEM)
alter_subreg (loc, false);
{
alter_subreg (loc, false);
if (GET_CODE (*loc) == MEM)
{
lra_get_insn_recog_data (insn)->used_insn_alternative = -1;
if (lra_dump_file != NULL)
fprintf (lra_dump_file,
"Memory subreg was simplified in in insn #%u\n",
INSN_UID (insn));
}
}
return res;
}
else if (code == REG && (i = REGNO (*loc)) >= FIRST_PSEUDO_REGISTER
......
2020-03-16 Vladimir Makarov <vmakarov@redhat.com>
PR target/94185
* g++.target/i386/pr94185.C: New test.
2020-03-16 Richard Sandiford <richard.sandiford@arm.com>
* gcc.target/aarch64/sve/acle/general-c/sizeless-1.c: Add a test
......
/* { dg-do compile } */
/* { dg-options "-O2 -fPIE -fstack-protector-strong" } */
struct a {
int b;
int c();
a() : b(c()) {}
~a();
char *e();
};
struct f {
void g(int);
};
struct ar {
int au[256];
f h(int);
} bb;
a i();
a j(int);
long k(int, ar);
int d;
void l(char *, ar m, long n) {
switch (m.au[d])
case 0:
n &= 4294967295;
bb.h(0).g(n);
}
void o() {
ar bd;
a bh, bi, attrname = j(0) = i();
int be = k(0, bd);
l(attrname.e(), bd, be);
}
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