diff --git a/loopy/transform/arithmetic.py b/loopy/transform/arithmetic.py index d41222c26056300729b0c4005200ba6ea904010d..2c50b3f11a34ced81d6a93eb467482110f495f2f 100644 --- a/loopy/transform/arithmetic.py +++ b/loopy/transform/arithmetic.py @@ -158,7 +158,7 @@ def collect_common_factors_on_increment(kernel, var_name, vary_by_axes=()): continue if not isinstance(insn, Assignment): - raise LoopyError("'%s' modified by non-expression instruction" + raise LoopyError("'%s' modified by non-single-assignment" % var_name) lhs = insn.assignee diff --git a/loopy/transform/precompute.py b/loopy/transform/precompute.py index 5c9a286de2678c1c23bcb3df682110c431bc793c..6ea0c06e631c5ea321dfd3a11b42f00bb0480078 100644 --- a/loopy/transform/precompute.py +++ b/loopy/transform/precompute.py @@ -426,8 +426,9 @@ def precompute(kernel, subst_use, sweep_inames=[], within=None, import loopy as lp for insn in kernel.instructions: - if isinstance(insn, lp.Assignment): - invg(insn.assignee, kernel, insn) + if isinstance(insn, lp.MultiAssignmentBase): + for assignee in insn.assignees: + invg(assignee, kernel, insn) invg(insn.expression, kernel, insn) access_descriptors = invg.access_descriptors