This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Enable fixed-point reductions in graphite


Hi,

In patch "Don't allow unsafe reductions in graphite" ( submitted https://gcc.gnu.org/ml/gcc-patches/2015-07/msg01861.html , committed r226193) we've disabled fixed-point reductions.

In this patch we enable it again, for the case that it's safe, in other words, for the case that the fixed point overflow wraps.

The patch uses FIXED_POINT_TYPE_OVERFLOW_WRAPS_P, introduced in proposed patch https://gcc.gnu.org/ml/gcc-patches/2015-07/msg02049.html .

Bootstrapped and reg-tested on x86_64.

OK for trunk?

Thanks,
- Tom
Enable fixed-point reductions in graphite

2015-07-24  Tom de Vries  <tom@codesourcery.com>

	* graphite-sese-to-poly.c (is_reduction_operation_p): Allow wrapping
	fixed-point operations.
---
 gcc/graphite-sese-to-poly.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gcc/graphite-sese-to-poly.c b/gcc/graphite-sese-to-poly.c
index 531c848..aa823f8 100644
--- a/gcc/graphite-sese-to-poly.c
+++ b/gcc/graphite-sese-to-poly.c
@@ -2626,6 +2626,9 @@ is_reduction_operation_p (gimple stmt)
       return false;
     }
 
+  if (FIXED_POINT_TYPE_P (type))
+    return FIXED_POINT_TYPE_OVERFLOW_WRAPS_P (type);
+
   return false;
 }
 
-- 
1.9.1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]