From a128b892f09720a0414c49be9b3e5440f7ca995c Mon Sep 17 00:00:00 2001
From: Andreas Kloeckner <inform@tiker.net>
Date: Thu, 30 Jan 2014 14:16:26 -0600
Subject: [PATCH] Revert "Tweak loop bound generation"

This reverts commit b0bc548f4e535ed58abe3a6acffb6c9661356f25.
---
 loopy/isl_helpers.py | 7 +++----
 test/test_loopy.py   | 3 +--
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/loopy/isl_helpers.py b/loopy/isl_helpers.py
index e894e4f9f..201aee16c 100644
--- a/loopy/isl_helpers.py
+++ b/loopy/isl_helpers.py
@@ -204,11 +204,10 @@ def static_extremum_of_pw_aff(pw_aff, constants_only, set_method, what, context)
                     % (what, pw_aff))
         return result
 
-    # Put constant bounds last, they're usually too restrictive.
+    # put constant bounds first
     pieces = (
-            [(set, aff) for set, aff in pieces if not aff.is_cst()]
-            + [(set, aff) for set, aff in pieces if aff.is_cst()]
-            )
+            [(set, aff) for set, aff in pieces if aff.is_cst()]
+            + [(set, aff) for set, aff in pieces if not aff.is_cst()])
 
     reference = pw_aff.get_aggregate_domain()
     if context is not None:
diff --git a/test/test_loopy.py b/test/test_loopy.py
index 6d98f93a9..7957fc9ca 100644
--- a/test/test_loopy.py
+++ b/test/test_loopy.py
@@ -1620,8 +1620,7 @@ def test_slab_decomposition_does_not_double_execute(ctx_factory):
 
     knl = lp.make_kernel(ctx.devices[0],
         "{ [i]: 0<=i<n }",
-        "a[i] = 2*a[i]",
-        assumptions="n>=1")
+        "a[i] = 2*a[i]")
 
     ref_knl = knl
 
-- 
GitLab