reload1.c (calculate_needs_all_insns): If deleting an instruction, remove its insn_chain structure as well.
* reload1.c (calculate_needs_all_insns): If deleting an instruction, remove its insn_chain structure as well. * gcc.dg/20001009-1.c: New test. From-SVN: r36824
This commit is contained in:
parent
a7210984e1
commit
462561b741
@ -1,3 +1,8 @@
|
|||||||
|
2000-10-10 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
* reload1.c (calculate_needs_all_insns): If deleting an instruction,
|
||||||
|
remove its insn_chain structure as well.
|
||||||
|
|
||||||
2000-10-09 J. David Anglin <dave@hiauly1.hia.nrc.ca>
|
2000-10-09 J. David Anglin <dave@hiauly1.hia.nrc.ca>
|
||||||
|
|
||||||
* dbxout.c (dbxout_source_line): Remove extra tab.
|
* dbxout.c (dbxout_source_line): Remove extra tab.
|
||||||
|
@ -1330,15 +1330,17 @@ calculate_needs_all_insns (global)
|
|||||||
int global;
|
int global;
|
||||||
{
|
{
|
||||||
struct insn_chain **pprev_reload = &insns_need_reload;
|
struct insn_chain **pprev_reload = &insns_need_reload;
|
||||||
struct insn_chain *chain;
|
struct insn_chain *chain, *next = 0;
|
||||||
|
|
||||||
something_needs_elimination = 0;
|
something_needs_elimination = 0;
|
||||||
|
|
||||||
reload_insn_firstobj = (char *) obstack_alloc (&reload_obstack, 0);
|
reload_insn_firstobj = (char *) obstack_alloc (&reload_obstack, 0);
|
||||||
for (chain = reload_insn_chain; chain != 0; chain = chain->next)
|
for (chain = reload_insn_chain; chain != 0; chain = next)
|
||||||
{
|
{
|
||||||
rtx insn = chain->insn;
|
rtx insn = chain->insn;
|
||||||
|
|
||||||
|
next = chain->next;
|
||||||
|
|
||||||
/* Clear out the shortcuts. */
|
/* Clear out the shortcuts. */
|
||||||
chain->n_reloads = 0;
|
chain->n_reloads = 0;
|
||||||
chain->need_elim = 0;
|
chain->need_elim = 0;
|
||||||
@ -1394,6 +1396,15 @@ calculate_needs_all_insns (global)
|
|||||||
PUT_CODE (insn, NOTE);
|
PUT_CODE (insn, NOTE);
|
||||||
NOTE_SOURCE_FILE (insn) = 0;
|
NOTE_SOURCE_FILE (insn) = 0;
|
||||||
NOTE_LINE_NUMBER (insn) = NOTE_INSN_DELETED;
|
NOTE_LINE_NUMBER (insn) = NOTE_INSN_DELETED;
|
||||||
|
/* Delete it from the reload chain */
|
||||||
|
if (chain->prev)
|
||||||
|
chain->prev->next = next;
|
||||||
|
else
|
||||||
|
reload_insn_chain = next;
|
||||||
|
if (next)
|
||||||
|
next->prev = chain->prev;
|
||||||
|
chain->next = unused_insn_chains;
|
||||||
|
unused_insn_chains = chain;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
2000-10-10 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
* gcc.dg/20001009-1.c: New test.
|
||||||
|
|
||||||
Mon Oct 9 23:32:06 MET DST 2000 Jan Hubicka <jh@suse.cz>
|
Mon Oct 9 23:32:06 MET DST 2000 Jan Hubicka <jh@suse.cz>
|
||||||
|
|
||||||
* gcc.c-torture/compile/20001009-1.c: Move from here ....
|
* gcc.c-torture/compile/20001009-1.c: Move from here ....
|
||||||
|
47
gcc/testsuite/gcc.dg/20001009-1.c
Normal file
47
gcc/testsuite/gcc.dg/20001009-1.c
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
/* { dg-do compile } */
|
||||||
|
/* { dg-options "-O2 -fpic" } */
|
||||||
|
|
||||||
|
extern void foo (void *a, double x, double y);
|
||||||
|
void
|
||||||
|
bar (void *a, double b, double c, double d, double e, double f, double g, double h, double i, double j, double k[6])
|
||||||
|
{
|
||||||
|
double l, m, n, o, p;
|
||||||
|
double q, r, s, t, u;
|
||||||
|
double x, y, v, w;
|
||||||
|
double z = 0.5 * j;
|
||||||
|
double aa;
|
||||||
|
l = b - 3 * d;
|
||||||
|
m = 4 * f;
|
||||||
|
n = f - h;
|
||||||
|
q = c + 3 * g - i;
|
||||||
|
r = 2 * (e - 2 * g + i);
|
||||||
|
s = g - i;
|
||||||
|
if (l != 0.0)
|
||||||
|
{
|
||||||
|
aa = 0.0;
|
||||||
|
o = (- m + aa);
|
||||||
|
p = (- m - aa);
|
||||||
|
if (o > 0.0)
|
||||||
|
{
|
||||||
|
x = ((b-h)*o + 3*(d+h)*o + 3*(f-h)*o);
|
||||||
|
y = ((c-i)*o + 3*(e+i)*o + 3*(g-i)*o);
|
||||||
|
foo (a, z, w);
|
||||||
|
foo (a, -z, w);
|
||||||
|
}
|
||||||
|
if (p > 0.0)
|
||||||
|
{
|
||||||
|
x = ((b+3*f-h)*p + 3*(d-2*f+h)*p + 3*p);
|
||||||
|
y = ((c+3*g-i)*p + 3*(e-2*g+i)*p + 3*p);
|
||||||
|
v = x * k[0] + y * k[2];
|
||||||
|
w = x * k[1] + y * k[3];
|
||||||
|
foo (a, z, w);
|
||||||
|
foo (a, - z, w);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (q != 0.0)
|
||||||
|
{
|
||||||
|
aa = 0.0;
|
||||||
|
t = (- r + aa) / (2 * q);
|
||||||
|
u = (- r - aa) / (2 * q);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user