From 626422dff642fa52b35158550a44d9e3a4627de9 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner <inform@tiker.net> Date: Tue, 10 May 2016 11:55:29 -0500 Subject: [PATCH] Add explanation to regression test for #24 --- test/test_loopy.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/test/test_loopy.py b/test/test_loopy.py index 1205d209a..f7ef0db33 100644 --- a/test/test_loopy.py +++ b/test/test_loopy.py @@ -2491,9 +2491,17 @@ def test_clamp(ctx_factory): def test_forced_iname_deps_and_reduction(): + # See https://github.com/inducer/loopy/issues/24 + + # This is (purposefully) somewhat un-idiomatic, to replicate the conditions + # under which the above bug was found. If assignees were phi[i], then the + # iname propagation heuristic would not assume that dependent instructions + # need to run inside of 'i', and hence the forced_iname_* bits below would not + # be needed. + i1 = lp.CInstruction("i", "doSomethingToGetPhi();", - assignees=frozenset({"phi"})) + assignees="phi") from pymbolic.primitives import Subscript, Variable i2 = lp.Assignment("a", -- GitLab