From cd1e94d505f0d238b37f0012d53cc0e9bd2b44c9 Mon Sep 17 00:00:00 2001 From: Steven Johnson Date: Fri, 7 Feb 2020 14:56:56 -0800 Subject: [PATCH] Forbid debug_to_file() on vectorized Funcs (Issue #4596) --- src/VectorizeLoops.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/VectorizeLoops.cpp b/src/VectorizeLoops.cpp index 8ce087c9a8f2..af0c0f9de7a0 100644 --- a/src/VectorizeLoops.cpp +++ b/src/VectorizeLoops.cpp @@ -514,6 +514,10 @@ class VectorSubs : public IRMutator { } Expr visit(const Call *op) override { + user_assert(!op->is_intrinsic(Call::debug_to_file)) + << "It is not legal to use debug_to_file() on a Func that is also vectorized. " + << "Try removing the .vectorize() directive(s)."; + // Widen the call by changing the lanes of all of its // arguments and its return type vector new_args(op->args.size());