diff --git a/loopy/codegen/expression.py b/loopy/codegen/expression.py
index 870843aaa0bc80fbeb62100e467739fa50943f5f..a0f4305454792cf286c30d70bef6f4539baa144e 100644
--- a/loopy/codegen/expression.py
+++ b/loopy/codegen/expression.py
@@ -134,6 +134,10 @@ def dtype_to_type_context(dtype):
         return 'd'
     if dtype in [np.float32, np.complex64]:
         return 'f'
+    from pyopencl.array import vec
+    if dtype in vec.types.values():
+        return dtype_to_type_context(dtype.fields["x"][0])
+
     return None