aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2003-03-16 20:13:36 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2003-03-16 20:13:36 +0000
commitddc67067146f2783f386e61f880d6fe87fb324a3 (patch)
tree749a89537d94783cb3c07d61be72ff1f7ad7f747
parent0a71919d5257d2e9097d79d00d840f4ecfd746c4 (diff)
downloadgcc-ddc67067146f2783f386e61f880d6fe87fb324a3.zip
gcc-ddc67067146f2783f386e61f880d6fe87fb324a3.tar.gz
gcc-ddc67067146f2783f386e61f880d6fe87fb324a3.tar.bz2
re PR rtl-optimization/9016 (Failure to consistently constant fold "constant" C++ objects)
PR optimization/9016 * config/i386/i386.c (ix86_expand_move): Force more CONST_DOUBLEs into the constant pool. From-SVN: r64445
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/i386/i386.c14
2 files changed, 17 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d7d2eb4..9fee358 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index ae2f118..2dddfb7 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -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;
+ }
+ }
}
}