diff --git a/mlir/include/mlir/Pass/PassOptions.h b/mlir/include/mlir/Pass/PassOptions.h --- a/mlir/include/mlir/Pass/PassOptions.h +++ b/mlir/include/mlir/Pass/PassOptions.h @@ -120,7 +120,7 @@ /// Returns an argument name that maps to the specified value. std::optional findArgStrForValue(const DataType &value) { for (auto &it : this->Values) - if (it.V.compare(value)) + if (!it.V.compare(value)) return it.Name; return std::nullopt; }