diff options
author | Paolo Bonzini <bonzini@gnu.org> | 2009-05-12 09:52:27 +0000 |
---|---|---|
committer | Paolo Bonzini <bonzini@gcc.gnu.org> | 2009-05-12 09:52:27 +0000 |
commit | 5e8d18263db963468b8ac2c15e352c91b7c9a3e6 (patch) | |
tree | 9d31c3df7663febe72e115cd76a2cd35a011ece6 /gcc | |
parent | f90b7a5a7913cc7239cce42f6ca328b9a741b387 (diff) | |
download | gcc-5e8d18263db963468b8ac2c15e352c91b7c9a3e6.zip gcc-5e8d18263db963468b8ac2c15e352c91b7c9a3e6.tar.gz gcc-5e8d18263db963468b8ac2c15e352c91b7c9a3e6.tar.bz2 |
revert: optabs.c (prepare_cmp_insn): Temporarily disable test that causes spurious differences between trunk and...
2009-05-12 Paolo Bonzini <bonzini@gnu.org>
Revert:
2009-05-12 Paolo Bonzini <bonzini@gnu.org>
* optabs.c (prepare_cmp_insn): Temporarily disable test that
causes spurious differences between trunk and cond-optab branch.
From-SVN: r147426
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/optabs.c | 11 |
2 files changed, 20 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cbe7b30..1984d2a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,14 @@ 2009-05-12 Paolo Bonzini <bonzini@gnu.org> + Revert: + + 2009-05-12 Paolo Bonzini <bonzini@gnu.org> + + * optabs.c (prepare_cmp_insn): Temporarily disable test that + causes spurious differences between trunk and cond-optab branch. + +2009-05-12 Paolo Bonzini <bonzini@gnu.org> + * dojump.c (compare_from_rtx): Delete. * expmed.c (emit_store_flag): Only try cstore_optab. Canonicalize any MODE_CC mode to the cstorecc4 pattern. Use prepare_operand, fail diff --git a/gcc/optabs.c b/gcc/optabs.c index 970f150..9c8cb86 100644 --- a/gcc/optabs.c +++ b/gcc/optabs.c @@ -4015,6 +4015,17 @@ prepare_cmp_insn (rtx x, rtx y, enum rtx_code comparison, rtx size, gcc_assert (methods == OPTAB_DIRECT || methods == OPTAB_WIDEN || methods == OPTAB_LIB_WIDEN); + /* If we are optimizing, force expensive constants into a register. */ + if (CONSTANT_P (x) && optimize + && (rtx_cost (x, COMPARE, optimize_insn_for_speed_p ()) + > COSTS_N_INSNS (1))) + x = force_reg (mode, x); + + if (CONSTANT_P (y) && optimize + && (rtx_cost (y, COMPARE, optimize_insn_for_speed_p ()) + > COSTS_N_INSNS (1))) + y = force_reg (mode, y); + #ifdef HAVE_cc0 /* Make sure if we have a canonical comparison. The RTL documentation states that canonical comparisons are required only |