From e9a8b9edd478c255cc80d5d04516470640f54a89 Mon Sep 17 00:00:00 2001 From: Ye Kuang Date: Thu, 16 Jan 2020 09:11:57 +0900 Subject: [PATCH] add and --- taichi/transforms/simplify.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/taichi/transforms/simplify.cpp b/taichi/transforms/simplify.cpp index 1f6c6ad8294a75..584bd791826e13 100644 --- a/taichi/transforms/simplify.cpp +++ b/taichi/transforms/simplify.cpp @@ -840,7 +840,7 @@ class BasicBlockSimplify : public IRVisitor { clause[i]->is() || !has_side_effects) { // This stmt can be kept. } else if (clause[i]->is()) { - plain_clause = !is_atomic_value_used(clause, i); + plain_clause = plain_clause && !is_atomic_value_used(clause, i); } else { plain_clause = false; }