aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.4.0
diff options
context:
space:
mode:
authorJing Yu <jingyu@google.com>2010-01-27 13:22:49 -0800
committerJing Yu <jingyu@google.com>2010-01-27 13:22:49 -0800
commit2af1c87cfeb60fe5a05890d13183da7f0c2e8b01 (patch)
tree1c791a7e0fabfa042f1f748f0ecc5af06784e679 /gcc-4.4.0
parent30f553f6a7597e8084704b84876dea2af493d6fe (diff)
downloadtoolchain_gcc-2af1c87cfeb60fe5a05890d13183da7f0c2e8b01.zip
toolchain_gcc-2af1c87cfeb60fe5a05890d13183da7f0c2e8b01.tar.gz
toolchain_gcc-2af1c87cfeb60fe5a05890d13183da7f0c2e8b01.tar.bz2
Backport upstream patch r152443.
Fix a bug in distribute_and_simplify_rtx in which a floating point mode RTX is unsafely optimized.
Diffstat (limited to 'gcc-4.4.0')
-rw-r--r--gcc-4.4.0/README.google6
-rw-r--r--gcc-4.4.0/gcc/combine.c6
2 files changed, 12 insertions, 0 deletions
diff --git a/gcc-4.4.0/README.google b/gcc-4.4.0/README.google
index 1994180..e2f11a2 100644
--- a/gcc-4.4.0/README.google
+++ b/gcc-4.4.0/README.google
@@ -2229,3 +2229,9 @@ gcc/testsuite/gcc.c-torture/execute/pr42691.c
i2 "set reg const".
Owner: jingyu
Status: backport from upstream r155948.
+
+gcc/combine.c
+ Backport upstream patch r152443. Fix a bug in distribute_and_simplify_rtx
+ in which a floating point mode RTX is unsafely optimized.
+ Owner: dougkwan
+ Status: backport of upstream rev 152443.
diff --git a/gcc-4.4.0/gcc/combine.c b/gcc-4.4.0/gcc/combine.c
index 0de23fe..48ec81c 100644
--- a/gcc-4.4.0/gcc/combine.c
+++ b/gcc-4.4.0/gcc/combine.c
@@ -8516,6 +8516,12 @@ distribute_and_simplify_rtx (rtx x, int n)
enum rtx_code outer_code, inner_code;
rtx decomposed, distributed, inner_op0, inner_op1, new_op0, new_op1, tmp;
+ /* Distributivity is not true for floating point as it can change the
+ value. So we don't do it unless -funsafe-math-optimizations. */
+ if (FLOAT_MODE_P (GET_MODE (x))
+ && ! flag_unsafe_math_optimizations)
+ return NULL_RTX;
+
decomposed = XEXP (x, n);
if (!ARITHMETIC_P (decomposed))
return NULL_RTX;