[Mlir-commits] [mlir] [mlir][Transform] Add a transform.match.operation_empty op to allow s… (PR #68319)

Oleksandr Alex Zinenko llvmlistbot at llvm.org
Thu Oct 5 10:32:46 PDT 2023


================
@@ -55,12 +89,15 @@ class SingleOpMatcherOpTrait
                                     TransformState &state) {
     Value operandHandle = cast<OpTy>(this->getOperation()).getOperandHandle();
     auto payload = state.getPayloadOps(operandHandle);
-    if (!llvm::hasSingleElement(payload)) {
+    if (!payload.empty() && !llvm::hasSingleElement(payload)) {
----------------
ftynse wrote:

`llvm::hasNItemsOrLess`

https://github.com/llvm/llvm-project/pull/68319


More information about the Mlir-commits mailing list