From: Eric Botcazou Date: Sat, 18 Oct 2003 07:32:08 +0000 (+0200) Subject: cse.c (cse_insn): Check that the tentative replacement was successfully forced to... X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9d8de1de895cbaae3122dc0d9ab0079926dfb15c;p=platform%2Fupstream%2Fgcc.git cse.c (cse_insn): Check that the tentative replacement was successfully forced to memory before... * cse.c (cse_insn) [src_folded]: Check that the tentative replacement was successfully forced to memory before using the result. From-SVN: r72635 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b89036c..3fd42ab 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2003-10-18 Eric Botcazou + * cse.c (cse_insn) [src_folded]: Check that the tentative replacement + was successfully forced to memory before using the result. + +2003-10-18 Eric Botcazou + PR optimization/8178 * config/i386/i386.md (*movsi_zero): New insn to set a register to zero on TARGET_USE_MOV0 targets. diff --git a/gcc/cse.c b/gcc/cse.c index 7cdc72f..7612a5a 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,