aboutsummaryrefslogtreecommitdiff
path: root/gcc/cse.c
diff options
context:
space:
mode:
authorKazu Hirata <kazu@cs.umass.edu>2005-01-26 12:44:58 +0000
committerKazu Hirata <kazu@gcc.gnu.org>2005-01-26 12:44:58 +0000
commit7533544070c29d561a1b570c08f126123264e150 (patch)
tree75690121c889346e831191ed7ca5ee1886e91923 /gcc/cse.c
parent4018444567e39b5e06f07948de9031476dbb7f1d (diff)
downloadgcc-7533544070c29d561a1b570c08f126123264e150.zip
gcc-7533544070c29d561a1b570c08f126123264e150.tar.gz
gcc-7533544070c29d561a1b570c08f126123264e150.tar.bz2
* cse.c (fold_rtx): Call equiv_constant only when necessary.
From-SVN: r94260
Diffstat (limited to 'gcc/cse.c')
-rw-r--r--gcc/cse.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/cse.c b/gcc/cse.c
index 98854c9..febf243 100644
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -3877,8 +3877,6 @@ fold_rtx (rtx x, rtx insn)
code = find_comparison_args (code, &folded_arg0, &folded_arg1,
&mode_arg0, &mode_arg1);
- const_arg0 = equiv_constant (folded_arg0);
- const_arg1 = equiv_constant (folded_arg1);
/* If the mode is VOIDmode or a MODE_CC mode, we don't know
what kinds of things are being compared, so we can't do
@@ -3887,6 +3885,9 @@ fold_rtx (rtx x, rtx insn)
if (mode_arg0 == VOIDmode || GET_MODE_CLASS (mode_arg0) == MODE_CC)
break;
+ const_arg0 = equiv_constant (folded_arg0);
+ const_arg1 = equiv_constant (folded_arg1);
+
/* If we do not now have two constants being compared, see
if we can nevertheless deduce some things about the
comparison. */