predicates.md (easy_fp_constant): Return 0 for SFmode and DFmode before reload when...
authorDavid Edelsohn <edelsohn@gnu.org>
Thu, 24 Mar 2005 23:07:35 +0000 (23:07 +0000)
committerDavid Edelsohn <dje@gcc.gnu.org>
Thu, 24 Mar 2005 23:07:35 +0000 (18:07 -0500)
        * config/rs6000/predicates.md (easy_fp_constant): Return 0 for
        SFmode and DFmode before reload when
        flag_unsafe_math_optimizations not enabled.

From-SVN: r97014

gcc/ChangeLog
gcc/config/rs6000/predicates.md

index dba48fffb9c129f443cd3c8d3bd1bb97b7af4847..50f33446bb622c0cf6f92c7dd0bc1b061f97a7e0 100644 (file)
@@ -1,3 +1,9 @@
+2005-03-24  David Edelsohn  <edelsohn@gnu.org>
+
+       * config/rs6000/predicates.md (easy_fp_constant): Return 0 for
+       SFmode and DFmode before reload when
+       flag_unsafe_math_optimizations not enabled.
+
 2005-03-24  Geoffrey Keating  <geoffk@apple.com>
 
        * config/i386/darwin.h (TARGET_SUBTARGET_DEFAULT): Add
index 110898fcec6720b8d56147021995bbc9e7da9276..ab0cd8b1568b07e413edd57caa4a9c42cdfc26d1 100644 (file)
       long k[2];
       REAL_VALUE_TYPE rv;
 
-      if (TARGET_E500_DOUBLE)
-       return 0;
+      /* Force constants to memory before reload to utilize
+        compress_float_constant.
+        Avoid this when flag_unsafe_math_optimizations is enabled
+        because RDIV division to reciprocal optimization is not able
+        to regenerate the division.  */
+      if (TARGET_E500_DOUBLE
+          || (!reload_in_progress && !reload_completed
+             && !flag_unsafe_math_optimizations))
+        return 0;
 
       REAL_VALUE_FROM_CONST_DOUBLE (rv, op);
       REAL_VALUE_TO_TARGET_DOUBLE (rv, k);
       long l;
       REAL_VALUE_TYPE rv;
 
+      /* Force constants to memory before reload to utilize
+        compress_float_constant.
+        Avoid this when flag_unsafe_math_optimizations is enabled
+        because RDIV division to reciprocal optimization is not able
+        to regenerate the division.  */
+      if (!reload_in_progress && !reload_completed
+          && !flag_unsafe_math_optimizations)
+       return 0;
+
       REAL_VALUE_FROM_CONST_DOUBLE (rv, op);
       REAL_VALUE_TO_TARGET_SINGLE (rv, l);