re PR rtl-optimization/9016 (Failure to consistently constant fold "constant" C+...
authorMark Mitchell <mark@codesourcery.com>
Sun, 16 Mar 2003 20:13:36 +0000 (20:13 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Sun, 16 Mar 2003 20:13:36 +0000 (20:13 +0000)
PR optimization/9016
* config/i386/i386.c (ix86_expand_move): Force more CONST_DOUBLEs
into the constant pool.

From-SVN: r64445

gcc/ChangeLog
gcc/config/i386/i386.c

index d7d2eb465618ab4d403b7fdc061bea3198772301..9fee3589340c91fafa38f4804306ba524d56e104 100644 (file)
@@ -1,3 +1,9 @@
+2003-03-14  Mark Mitchell  <mark@codesourcery.com>
+
+       PR optimization/9016
+       * config/i386/i386.c (ix86_expand_move): Force more CONST_DOUBLEs
+       into the constant pool.
+
 2003-03-16  Falk Hueffner  <falk.hueffner@student.uni-tuebingen.de>
 
        PR target/9164
index ae2f118215ec96851937772af5d33210fbfe1062..2dddfb7f87730e8062497068ee2e4d6b8736b715 100644 (file)
@@ -8373,9 +8373,17 @@ ix86_expand_move (mode, operands)
 
          if (strict)
            ;
-         else if (GET_CODE (op1) == CONST_DOUBLE
-                  && register_operand (op0, mode))
-           op1 = validize_mem (force_const_mem (mode, op1));
+         else if (GET_CODE (op1) == CONST_DOUBLE)
+           {
+             op1 = validize_mem (force_const_mem (mode, op1));
+             if (!register_operand (op0, mode))
+               {
+                 rtx temp = gen_reg_rtx (mode);
+                 emit_insn (gen_rtx_SET (VOIDmode, temp, op1));
+                 emit_move_insn (op0, temp);
+                 return;
+               }
+           }
        }
     }