aboutsummaryrefslogtreecommitdiff
path: root/gcc/cse.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@cygnus.com>1999-01-11 18:54:32 -0800
committerRichard Henderson <rth@gcc.gnu.org>1999-01-11 18:54:32 -0800
commit1ff136fd07190e18264edfd89b389d9d3d16655a (patch)
tree38c765e76c500101cd2a77542dcb1f59cfc22afb /gcc/cse.c
parentfb857ec164b4e0616396a4ff07593db1a9974800 (diff)
downloadgcc-1ff136fd07190e18264edfd89b389d9d3d16655a.zip
gcc-1ff136fd07190e18264edfd89b389d9d3d16655a.tar.gz
gcc-1ff136fd07190e18264edfd89b389d9d3d16655a.tar.bz2
* cse.c (cse_insn): Never prefer (const (constant_p_rtx)).
From-SVN: r24637
Diffstat (limited to 'gcc/cse.c')
-rw-r--r--gcc/cse.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/cse.c b/gcc/cse.c
index 0d8fc4a..4ba247c 100644
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -6865,6 +6865,12 @@ cse_insn (insn, libcall_insn)
if (src == src_folded)
src_folded = 0;
+ /* Folds of constant_p_rtx are to be preferred, since we do
+ not wish any to live past CSE. */
+ if (src && GET_CODE (src) == CONST
+ && GET_CODE (XEXP (src, 0)) == CONSTANT_P_RTX)
+ src = 0;
+
/* At this point, ELT, if non-zero, points to a class of expressions
equivalent to the source of this SET and SRC, SRC_EQV, SRC_FOLDED,
and SRC_RELATED, if non-zero, each contain additional equivalent