summaryrefslogtreecommitdiff
path: root/gcc/cse.c
diff options
context:
space:
mode:
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2003-10-18 07:32:08 +0000
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2003-10-18 07:32:08 +0000
commitd4a7579023cdec0de834b0e8d85be24466b1d67e (patch)
tree1f378abe72774bb21ff4bf0f9ae053f7a7c0964d /gcc/cse.c
parent5e2ee112a80bd0f50fb344a4c2abac92446026be (diff)
downloadgcc-d4a7579023cdec0de834b0e8d85be24466b1d67e.tar.gz
* cse.c (cse_insn) [src_folded]: Check that the tentative replacement
was successfully forced to memory before using the result. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72635 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cse.c')
-rw-r--r--gcc/cse.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/cse.c b/gcc/cse.c
index 7cdc72f6506..7612a5a7ed5 100644
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -5416,7 +5416,11 @@ cse_insn (rtx insn, rtx libcall_insn)
{
trial = src_folded, src_folded_cost = MAX_COST;
if (src_folded_force_flag)
- trial = force_const_mem (mode, trial);
+ {
+ rtx forced = force_const_mem (mode, trial);
+ if (forced)
+ trial = forced;
+ }
}
else if (src
&& preferrable (src_cost, src_regcost,