diff --git a/mlir/lib/Dialect/OpenACC/IR/OpenACC.cpp b/mlir/lib/Dialect/OpenACC/IR/OpenACC.cpp index 45e0632db5ef2b..f484eda3268db0 100644 --- a/mlir/lib/Dialect/OpenACC/IR/OpenACC.cpp +++ b/mlir/lib/Dialect/OpenACC/IR/OpenACC.cpp @@ -628,7 +628,7 @@ template static LogicalResult verifyDeviceTypeCountMatch(Op op, OperandRange operands, ArrayAttr deviceTypes, llvm::StringRef keyword) { - if (operands.size() > 0 && deviceTypes.getValue().size() != operands.size()) + if (!operands.empty() && deviceTypes.getValue().size() != operands.size()) return op.emitOpError() << keyword << " operands count must match " << keyword << " device_type count"; return success();