diff --git a/mlir/lib/Dialect/Bufferization/Transforms/Bufferize.cpp b/mlir/lib/Dialect/Bufferization/Transforms/Bufferize.cpp index 97d4aab9f3dd5..c0e3fca428376 100644 --- a/mlir/lib/Dialect/Bufferization/Transforms/Bufferize.cpp +++ b/mlir/lib/Dialect/Bufferization/Transforms/Bufferize.cpp @@ -142,7 +142,7 @@ struct OneShotBufferizePass // Configure op filter. OpFilter::Entry::FilterFn filterFn = [&](Operation *op) { // Filter may be specified via options. - if (this->dialectFilter.hasValue()) + if (this->dialectFilter.hasValue() && !(*this->dialectFilter).empty()) return llvm::is_contained(this->dialectFilter, op->getDialect()->getNamespace()); // No filter specified: All other ops are allowed.