diff mbox

Enable fixed-point reductions in graphite

Message ID 55B51220.4040506@mentor.com
State New
Headers show

Commit Message

Tom de Vries July 26, 2015, 5 p.m. UTC
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
diff mbox

Patch

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