re PR middle-end/25474 (Extra load for some FP code)
authorRoger Sayle <roger@eyesopen.com>
Sun, 16 Apr 2006 23:33:51 +0000 (23:33 +0000)
committerRoger Sayle <sayle@gcc.gnu.org>
Sun, 16 Apr 2006 23:33:51 +0000 (23:33 +0000)
PR middle-end/25474
* expr.c (compress_float_constant): Copy the narrow constant into
a new pseudo before extending it to its final width.

From-SVN: r112991

gcc/ChangeLog
gcc/expr.c

index 9fbdca0a9017660cc2b3f046555a66d8632d5236..53e1029656ee9edcf882665e92ff989544cc3b4e 100644 (file)
@@ -1,3 +1,9 @@
+2006-04-16  Roger Sayle  <roger@eyesopen.com>
+
+       PR middle-end/25474
+       * expr.c (compress_float_constant): Copy the narrow constant into
+       a new pseudo before extending it to its final width.
+
 2006-04-16  Roger Sayle  <roger@eyesopen.com>
            Andrew Pinski  <pinskia@gcc.gnu.org>
            Dale Johannesen  <dalej@apple.com>
index 8d2839f8d6d0223066331e4d0ac95d15a266bcd0..b0e958c23b6fa351dfc84e7a5738b2165b32a8a8 100644 (file)
@@ -3346,7 +3346,11 @@ compress_float_constant (rtx x, rtx y)
        }
       else
        continue;
+
+      /* For CSE's benefit, force the compressed constant pool entry
+        into a new pseudo.  This constant may be used in different modes,
+        and if not, combine will put things back together for us.  */
+      trunc_y = force_reg (srcmode, trunc_y);
       emit_unop_insn (ic, x, trunc_y, UNKNOWN);
       last_insn = get_last_insn ();