diff options
author | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-02-03 06:44:35 +0000 |
---|---|---|
committer | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-02-03 06:44:35 +0000 |
commit | 09fde96cf451f1da14f7a447b02cb872e86f71a4 (patch) | |
tree | fb250b8935df7ba966a9aeae4f38b4eca4fc2969 /gcc/simplify-rtx.c | |
parent | b4f9573e66383d8db22f382c6462668fcb725810 (diff) | |
download | gcc-09fde96cf451f1da14f7a447b02cb872e86f71a4.tar.gz |
PR middle-end/19405
* real.h (REAL_MODE_FORMAT_COMPOSITE_P): New macro.
* fold-const.c (const_binop): Avoid constant folding floating
point operations in modes that use composite representations.
* simplify-rtx.c (simplify_binary_operation): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@94653 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/simplify-rtx.c')
-rw-r--r-- | gcc/simplify-rtx.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index 92567fe3c41..a1a774752cf 100644 --- a/gcc/simplify-rtx.c +++ b/gcc/simplify-rtx.c @@ -1346,8 +1346,12 @@ simplify_binary_operation (enum rtx_code code, enum machine_mode mode, /* Don't constant fold this floating point operation if the result may dependent upon the run-time rounding mode and - flag_rounding_math is set. */ - if (flag_rounding_math + flag_rounding_math is set, or if GCC's software emulation + is unable to accurately represent the result. */ + + if ((flag_rounding_math + || (REAL_MODE_FORMAT_COMPOSITE_P (mode) + && !flag_unsafe_math_optimizations)) && (inexact || !real_identical (&result, &value))) return NULL_RTX; |