Patchwork [10/44] Fix 435.gromacs miscompile.

login
register
mail settings
Submitter Sebastian Pop
Date Sept. 30, 2010, 6:01 p.m.
Message ID <1285869696-10915-11-git-send-email-sebpop@gmail.com>
Download mbox | patch
Permalink /patch/66195/
State New
Headers show

Comments

Sebastian Pop - Sept. 30, 2010, 6:01 p.m.
From: spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>

2010-08-12  Sebastian Pop  <sebastian.pop@amd.com>

	* graphite-clast-to-gimple.c (precision_for_value): Adjust
	computation of precision by 1.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/graphite@163214 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/ChangeLog                  |    5 +++++
 gcc/ChangeLog.graphite         |    5 +++++
 gcc/graphite-clast-to-gimple.c |    2 +-
 3 files changed, 11 insertions(+), 1 deletions(-)

Patch

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index ea1451c..7e4adf9 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@ 
+2010-08-12  Sebastian Pop  <sebastian.pop@amd.com>
+
+	* graphite-clast-to-gimple.c (precision_for_value): Adjust
+	computation of precision by 1.
+
 2010-09-30  Riyadh Baghdadi <baghdadi.mr@gmail.com>
 
 	* graphite-cloog-util.c (openscop_read_cloog_matrix): New.
diff --git a/gcc/ChangeLog.graphite b/gcc/ChangeLog.graphite
index 6c56686..7dd6378 100644
--- a/gcc/ChangeLog.graphite
+++ b/gcc/ChangeLog.graphite
@@ -1,3 +1,8 @@ 
+2010-08-12  Sebastian Pop  <sebastian.pop@amd.com>
+
+	* graphite-clast-to-gimple.c (precision_for_value): Adjust
+	computation of precision by 1.
+
 2010-08-12  Riyadh Baghdadi <baghdadi.mr@gmail.com>
 
 	* graphite-cloog-util.c (openscop_read_cloog_matrix): New.
diff --git a/gcc/graphite-clast-to-gimple.c b/gcc/graphite-clast-to-gimple.c
index 88a72f1..6fde344 100644
--- a/gcc/graphite-clast-to-gimple.c
+++ b/gcc/graphite-clast-to-gimple.c
@@ -415,7 +415,7 @@  precision_for_value (mpz_t val)
   if (mpz_sgn (y) < 0)
     mpz_neg (y, y);
 
-  while (mpz_cmp (y, x) > 0)
+  while (mpz_cmp (y, x) >= 0)
     {
       mpz_mul (x, x, two);
       precision++;