diff --git a/src/transform/thread_storage_sync.cc b/src/transform/thread_storage_sync.cc index 1fd0f10a7..2e5e01702 100644 --- a/src/transform/thread_storage_sync.cc +++ b/src/transform/thread_storage_sync.cc @@ -1417,8 +1417,8 @@ struct TileLangThreadSyncPlanner : public ConstrVisitor { // If this is a read into a double buffer that was previously // swapped out, then it doesn't conflict. - if (prev.double_buffer_write && curr.type == kRead && !loop_carry) { - return false; + if (curr.type == kWrite && prev.type == kRead && loop_carry) { + return true; } // If nothing else allows sharing the same buffer, then they are