diff --git a/doc/reference.rst b/doc/reference.rst
index fb579a2b560a120f65504c58c15f033d0f42aa82..bf11a96cc2636e15eb19c5f1d6ff3c5db334b6c8 100644
--- a/doc/reference.rst
+++ b/doc/reference.rst
@@ -183,6 +183,9 @@ These are usually key-value pairs. The following attributes are recognized:
   code generated for this instruction appears textually after both of these
   instructions' generated code.
 
+  Identifiers here are allowed to be wildcards as defined by
+  :mod:`fnmatchcase`.
+
   .. note::
 
       If this is not specified, :mod:`loopy` will automatically add
diff --git a/loopy/kernel/creation.py b/loopy/kernel/creation.py
index d51f788a5c97888f1fc7a8c40a2013e917654933..fa0b91be8ac4d3ec0c721c4164fc983cf4643b56 100644
--- a/loopy/kernel/creation.py
+++ b/loopy/kernel/creation.py
@@ -849,6 +849,35 @@ def apply_default_order_to_args(kernel, default_order):
 # }}}
 
 
+# {{{ resolve wildcard insn dependencies
+
+def resolve_wildcard_deps(knl):
+    new_insns = []
+
+    from fnmatch import fnmatchcase
+    for insn in knl.instructions:
+        if insn.insn_deps is not None:
+            new_deps = set()
+            for dep in insn.insn_deps:
+                match_count = 0
+                for other_insn in knl.instructions:
+                    if fnmatchcase(other_insn.id, dep):
+                        new_deps.add(other_insn.id)
+                        match_count += 1
+
+                if match_count == 0:
+                    # Uh, best we can do
+                    new_deps.append(dep)
+
+            insn = insn.copy(insn_deps=frozenset(new_deps))
+
+        new_insns.append(insn)
+
+    return knl.copy(instructions=new_insns)
+
+# }}}
+
+
 # {{{ kernel creation top-level
 
 def make_kernel(device, domains, instructions, kernel_data=["..."], **kwargs):
@@ -1001,6 +1030,7 @@ def make_kernel(device, domains, instructions, kernel_data=["..."], **kwargs):
     knl = expand_defines_in_shapes(knl, defines)
     knl = guess_arg_shape_if_requested(knl, default_order)
     knl = apply_default_order_to_args(knl, default_order)
+    knl = resolve_wildcard_deps(knl)
 
     # -------------------------------------------------------------------------
     # Ordering dependency: