diff options
author | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-10-11 03:49:54 +0000 |
---|---|---|
committer | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-10-11 03:49:54 +0000 |
commit | 634d45d7c46dd17b34676d0ce4a450670c18cca8 (patch) | |
tree | 21edeff789f11f21f721ad4c372bd423b1038dca /gcc/optabs.c | |
parent | 75a3b60ca599d9b33b45ba9378fd5458f1708eb3 (diff) | |
download | gcc-634d45d7c46dd17b34676d0ce4a450670c18cca8.tar.gz |
* cse.c (constant_pool_entries_regcost): New global variable to
hold the register cost component of constant_pool_entries_cost.
(fold_rtx): Calculate constant_pool_entries_regcost at the same
time as constant_pool_entries_cost.
(cse_insn): Set both src_folded_cost and src_folded_regcost from
constant_pool_entries_cost and constant_pool_entries_regcost.
(cse_main): Initialize constant_pool_entries_regcost to zero.
* optabs.c (expand_unop): Attach a REG_EQUAL note describing
the semantics of the sequence of bit operations used to negate
a floating-point value.
(expand_abs_nojump): Likewise attach a REG_EQUAL note describing
the semantics of the bit operations used to abs a floating point
value.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72326 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/optabs.c')
-rw-r--r-- | gcc/optabs.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/gcc/optabs.c b/gcc/optabs.c index e29c92af1e8..10a3809430d 100644 --- a/gcc/optabs.c +++ b/gcc/optabs.c @@ -2615,7 +2615,16 @@ expand_unop (enum machine_mode mode, optab unoptab, rtx op0, rtx target, immed_double_const (lo, hi, imode), NULL_RTX, 1, OPTAB_LIB_WIDEN); if (temp != 0) - return gen_lowpart (mode, temp); + { + rtx insn; + if (target == 0) + target = gen_reg_rtx (mode); + insn = emit_move_insn (target, gen_lowpart (mode, temp)); + set_unique_reg_note (insn, REG_EQUAL, + gen_rtx_fmt_e (NEG, mode, + copy_rtx (op0))); + return target; + } delete_insns_since (last); } } @@ -2790,7 +2799,16 @@ expand_abs_nojump (enum machine_mode mode, rtx op0, rtx target, immed_double_const (~lo, ~hi, imode), NULL_RTX, 1, OPTAB_LIB_WIDEN); if (temp != 0) - return gen_lowpart (mode, temp); + { + rtx insn; + if (target == 0) + target = gen_reg_rtx (mode); + insn = emit_move_insn (target, gen_lowpart (mode, temp)); + set_unique_reg_note (insn, REG_EQUAL, + gen_rtx_fmt_e (ABS, mode, + copy_rtx (op0))); + return target; + } delete_insns_since (last); } } |