aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Edelsohn <edelsohn@gnu.org>2005-03-24 23:07:35 +0000
committerDavid Edelsohn <dje@gcc.gnu.org>2005-03-24 18:07:35 -0500
commitb6dc550705f6631e85e882a6ebcb79f3c1956071 (patch)
treee47528aaabeae9d8c46c3f54a7972d6e8cc862c3
parentaad9ff31d82b49dc0e61787af2efc884bec0693c (diff)
downloadgcc-b6dc550705f6631e85e882a6ebcb79f3c1956071.zip
gcc-b6dc550705f6631e85e882a6ebcb79f3c1956071.tar.gz
gcc-b6dc550705f6631e85e882a6ebcb79f3c1956071.tar.bz2
predicates.md (easy_fp_constant): Return 0 for SFmode and DFmode before reload when...
* 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
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/rs6000/predicates.md20
2 files changed, 24 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index dba48ff..50f3344 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/config/rs6000/predicates.md b/gcc/config/rs6000/predicates.md
index 110898f..ab0cd8b 100644
--- a/gcc/config/rs6000/predicates.md
+++ b/gcc/config/rs6000/predicates.md
@@ -219,8 +219,15 @@
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);
@@ -234,6 +241,15 @@
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);