From 9564148a3c31fd6e105968f1d844fdb0909e2a75 Mon Sep 17 00:00:00 2001 From: dabaiji Date: Fri, 24 Jul 2020 11:15:58 +0800 Subject: [PATCH] fix scalar rearrange bug --- src/pass/inject_thread_bind.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pass/inject_thread_bind.cc b/src/pass/inject_thread_bind.cc index 075f0cf..a463be2 100644 --- a/src/pass/inject_thread_bind.cc +++ b/src/pass/inject_thread_bind.cc @@ -1373,10 +1373,11 @@ class ScalarPeel : public IRMutator { public: Stmt Run(const Stmt &s) { Stmt res = Mutate(s); - if (!before_scalar_store_) { + if (!before_scalar_store_ || !find_multi_core_) { multi_core_body_ = s; return Stmt(); } + CHECK(multi_core_body_.defined()) << "Error, multicore body is not defined."; return res; } -- GitLab