diff options
author | Jakub Jelinek <jakub@redhat.com> | 2005-01-19 10:31:16 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2005-01-19 10:31:16 +0100 |
commit | 49c3b9a84696a13e3ef71708ef80552606dd08c4 (patch) | |
tree | ef90a2aa86b89aceaa4c818ff027effc25d5f55e /gcc/testsuite/gcc.dg/20050111-2.c | |
parent | e89be13bdf98cff1cbbdd9490e4b4d5e20e68baf (diff) | |
download | gcc-49c3b9a84696a13e3ef71708ef80552606dd08c4.tar.gz |
re PR rtl-optimization/15139 (cc1 uses excessive amounts of memory compiling small routine)
PR rtl-optimization/15139
* combine.c: Include params.h.
(count_rtxs): New function.
(record_value_for_reg): If replace_rtx would replace at least
2 occurrences of REG in VALUE and TEM is really large, replace REG with
(clobber (const_int 0)) instead of TEM.
* params.def (PARAM_MAX_LAST_VALUE_RTL): New.
* params.h (MAX_LAST_VALUE_RTL): New.
* Makefile.in (combine.o): Depend on $(PARAMS_H).
* doc/invoke.texi (--param max-last-value-rtl=N): Document.
* gcc.dg/20050111-2.c: New test.
From-SVN: r93892
Diffstat (limited to 'gcc/testsuite/gcc.dg/20050111-2.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/20050111-2.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/20050111-2.c b/gcc/testsuite/gcc.dg/20050111-2.c new file mode 100644 index 00000000000..17e59ce968c --- /dev/null +++ b/gcc/testsuite/gcc.dg/20050111-2.c @@ -0,0 +1,21 @@ +/* PR rtl-optimization/15139 */ +/* { dg-do compile } */ +/* { dg-options "-O2 -funroll-loops" } */ + +void +foo (double **a, double **z) +{ + long int i, j; + double d = -1.0; + + for (i = 0; i < 6; i++) + for (j = 0; j < 5; j++) + d = z[i][j] > d ? z[i][j] : d; + + for (i = 0; i < 6; i++) + for (j = 0; j < 5; j++) + z[i][j] /= d; + + for (i = 0; i < 5; i++) + a[i][j] = z[i][j]; +} |