From 6abd07b7e5c38d71779e844a7cfc42bcdc16b973 Mon Sep 17 00:00:00 2001
From: Tim Warburton <timwar@caam.rice.edu>
Date: Tue, 6 Nov 2012 02:23:50 -0600
Subject: [PATCH] Make sure StackWildcardMatch also tries the empty match.

---
 loopy/context_matching.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/loopy/context_matching.py b/loopy/context_matching.py
index 6a428144e..76ef818f3 100644
--- a/loopy/context_matching.py
+++ b/loopy/context_matching.py
@@ -148,7 +148,10 @@ class StackWildcardMatch(StackMatchBase):
 
         n = len(stack)
 
-        for i in xrange(n):
+        if self.up_match(stack):
+            return True
+
+        for i in xrange(1, n):
             if self.up_match(stack[:-i]):
                 return True
 
-- 
GitLab