aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Sandiford <rsandifo@nildram.co.uk>2007-11-09 12:11:48 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2007-11-09 12:11:48 +0000
commit06acf7d0ad169b40c2e7f83c7ed808b2e196a6a4 (patch)
treef19b799e19f9ca3fd962b7caa8a728b5a281f61c /gcc
parentea9d4a19375522ae9834d75edb217325f3c3e111 (diff)
downloadgcc-06acf7d0ad169b40c2e7f83c7ed808b2e196a6a4.zip
gcc-06acf7d0ad169b40c2e7f83c7ed808b2e196a6a4.tar.gz
gcc-06acf7d0ad169b40c2e7f83c7ed808b2e196a6a4.tar.bz2
dse.c (find_shift_sequence): Always choose an integer mode for new_mode.
gcc/ * dse.c (find_shift_sequence): Always choose an integer mode for new_mode. (replace_read): Require both the read and store mode to be integer ones. Remove a then-redundant FLOAT_P check. gcc/testsuite/ * gcc.target/mips/dse-1.c: Disable. From-SVN: r130039
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/dse.c12
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gcc.target/mips/dse-1.c4
4 files changed, 21 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 2d0e93c..d4e13bd 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2007-11-09 Richard Sandiford <rsandifo@nildram.co.uk>
+
+ * dse.c (find_shift_sequence): Always choose an integer mode for
+ new_mode.
+ (replace_read): Require both the read and store mode to be
+ integer ones. Remove a then-redundant FLOAT_P check.
+
2007-11-08 Richard Guenther <rguenther@suse.de>
* tree-dfa.c (remove_referenced_var): If removing a
diff --git a/gcc/dse.c b/gcc/dse.c
index 764c335..2b86018 100644
--- a/gcc/dse.c
+++ b/gcc/dse.c
@@ -1447,7 +1447,7 @@ find_shift_sequence (rtx read_reg,
continue;
new_mode = smallest_mode_for_size (access_size * BITS_PER_UNIT,
- GET_MODE_CLASS (read_mode));
+ MODE_INT);
new_reg = gen_reg_rtx (new_mode);
start_sequence ();
@@ -1473,9 +1473,8 @@ find_shift_sequence (rtx read_reg,
of the arguments and could be precomputed. It may
not be worth doing so. We could precompute if
worthwhile or at least cache the results. The result
- technically depends on SHIFT, ACCESS_SIZE, and
- GET_MODE_CLASS (READ_MODE). But in practice the
- answer will depend only on ACCESS_SIZE. */
+ technically depends on both SHIFT and ACCESS_SIZE,
+ but in practice the answer will depend only on ACCESS_SIZE. */
if (cost > COSTS_N_INSNS (1))
continue;
@@ -1557,7 +1556,8 @@ replace_read (store_info_t store_info, insn_info_t store_insn,
if (!dbg_cnt (dse))
return false;
- if (GET_MODE_CLASS (read_mode) != GET_MODE_CLASS (store_mode))
+ if (GET_MODE_CLASS (read_mode) != MODE_INT
+ || GET_MODE_CLASS (store_mode) != MODE_INT)
return false;
/* To get here the read is within the boundaries of the write so
@@ -1580,7 +1580,7 @@ replace_read (store_info_t store_info, insn_info_t store_insn,
call to get rid of the read. */
if (shift)
{
- if (access_size > UNITS_PER_WORD || FLOAT_MODE_P (store_mode))
+ if (access_size > UNITS_PER_WORD)
return false;
shift_seq = find_shift_sequence (read_reg, access_size, store_info,
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index c627561..0f31de0 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2007-11-09 Richard Sandiford <rsandifo@nildram.co.uk>
+
+ * gcc.target/mips/dse-1.c: Disable.
+
2007-11-08 Tom Tromey <tromey@redhat.com>
* gcc.dg/empty-source-3.c: Update warning location.
diff --git a/gcc/testsuite/gcc.target/mips/dse-1.c b/gcc/testsuite/gcc.target/mips/dse-1.c
index 0491265..0a21af7 100644
--- a/gcc/testsuite/gcc.target/mips/dse-1.c
+++ b/gcc/testsuite/gcc.target/mips/dse-1.c
@@ -1,3 +1,7 @@
+/* ??? Further to the subreg comment below, we can't rely on any of the
+ tests passing unless we handle subregs, and the patch to do so has
+ been rejected for the time being. */
+/* { dg-do compile { target { ! *-*-* } } } */
/* { dg-mips-options "-mgp64 -O" } */
#define TEST(ID, TYPE1, TYPE2) \