diff --git a/tests/test125cells.c b/tests/test125cells.c
index 3d7d5458f1ef031d6e497eab44b4f4be4fab16e5..944ed793686e7289106cba73048b4247aec180ab 100644
--- a/tests/test125cells.c
+++ b/tests/test125cells.c
@@ -891,8 +891,10 @@ int main(int argc, char *argv[]) {
   for (int i = 0; i < 125; ++i) clean_up(cells[i]);
   free(solution);
 
+#ifdef WITH_VECTORIZATION
   cache_clean(&runner.ci_cache);
   cache_clean(&runner.cj_cache);
+#endif
 
   return 0;
 }
diff --git a/tests/test27cells.c b/tests/test27cells.c
index 92a36d7dcdf505342f97c1ab3fe1cbc6aaccca22..ba98d91a4250865f301bd96594b1364d95034bbb 100644
--- a/tests/test27cells.c
+++ b/tests/test27cells.c
@@ -616,8 +616,10 @@ int main(int argc, char *argv[]) {
   /* Clean things to make the sanitizer happy ... */
   for (int i = 0; i < 27; ++i) clean_up(cells[i]);
 
+#ifdef WITH_VECTORIZATION
   cache_clean(&runner.ci_cache);
   cache_clean(&runner.cj_cache);
+#endif
 
   return 0;
 }