OSDN Git Service

* cse.c (cse_insn) [src_folded]: Check that the tentative replacement
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 18 Oct 2003 07:32:08 +0000 (07:32 +0000)
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 18 Oct 2003 07:32:08 +0000 (07:32 +0000)
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

gcc/ChangeLog
gcc/cse.c

index b89036c..3fd42ab 100644 (file)
@@ -1,5 +1,10 @@
 2003-10-18  Eric Botcazou  <ebotcazou@libertysurf.fr>
 
+       * 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  <ebotcazou@libertysurf.fr>
+
        PR optimization/8178
        * config/i386/i386.md (*movsi_zero): New insn to set
        a register to zero on TARGET_USE_MOV0 targets.
index 7cdc72f..7612a5a 100644 (file)
--- 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,