summaryrefslogtreecommitdiff
path: root/gcc/postreload.c
diff options
context:
space:
mode:
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2003-11-02 08:32:23 +0000
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2003-11-02 08:32:23 +0000
commitdf41fe2ee93d13e2e6f7f9eb5565417636525297 (patch)
treef9f98447bfc855ed01ad956bcc0821924a93fa02 /gcc/postreload.c
parentcc7530fdf232c93cc219eabe7e52a17f2022b88d (diff)
downloadgcc-df41fe2ee93d13e2e6f7f9eb5565417636525297.tar.gz
PR optimization/12799
* postreload.c (reload_cse_move2add): Generate the add2 patterns manually. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@73195 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/postreload.c')
-rw-r--r--gcc/postreload.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/gcc/postreload.c b/gcc/postreload.c
index 362b50ebc13..b55c4476f2d 100644
--- a/gcc/postreload.c
+++ b/gcc/postreload.c
@@ -1199,14 +1199,12 @@ reload_cse_move2add (rtx first)
else if (rtx_cost (new_src, PLUS) < rtx_cost (src, SET)
&& have_add2_insn (reg, new_src))
{
- rtx newpat = gen_add2_insn (reg, new_src);
- if (INSN_P (newpat) && NEXT_INSN (newpat) == NULL_RTX)
- newpat = PATTERN (newpat);
- /* If it was the first insn of a sequence or
- some other emitted insn, validate_change will
- reject it. */
- validate_change (insn, &PATTERN (insn),
- newpat, 0);
+ rtx newpat = gen_rtx_SET (VOIDmode,
+ reg,
+ gen_rtx_PLUS (GET_MODE (reg),
+ reg,
+ new_src));
+ validate_change (insn, &PATTERN (insn), newpat, 0);
}
else
{
@@ -1288,10 +1286,11 @@ reload_cse_move2add (rtx first)
< COSTS_N_INSNS (1) + rtx_cost (src3, SET))
&& have_add2_insn (reg, new_src))
{
- rtx newpat = gen_add2_insn (reg, new_src);
- if (INSN_P (newpat)
- && NEXT_INSN (newpat) == NULL_RTX)
- newpat = PATTERN (newpat);
+ rtx newpat = gen_rtx_SET (VOIDmode,
+ reg,
+ gen_rtx_PLUS (GET_MODE (reg),
+ reg,
+ new_src));
success
= validate_change (next, &PATTERN (next),
newpat, 0);