[Mlir-commits] [mlir] 585e35a - [mlir] Use llvm::is_contained (NFC)

Kazu Hirata llvmlistbot at llvm.org
Sun Nov 6 19:56:20 PST 2022


Author: Kazu Hirata
Date: 2022-11-06T19:56:15-08:00
New Revision: 585e35a998e5093e920198564f3bb3395bd47ec4

URL: https://github.com/llvm/llvm-project/commit/585e35a998e5093e920198564f3bb3395bd47ec4
DIFF: https://github.com/llvm/llvm-project/commit/585e35a998e5093e920198564f3bb3395bd47ec4.diff

LOG: [mlir] Use llvm::is_contained (NFC)

Added: 
    

Modified: 
    mlir/lib/Dialect/SCF/IR/SCF.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/SCF/IR/SCF.cpp b/mlir/lib/Dialect/SCF/IR/SCF.cpp
index 684b911f55d45..3f65c1ce0107f 100644
--- a/mlir/lib/Dialect/SCF/IR/SCF.cpp
+++ b/mlir/lib/Dialect/SCF/IR/SCF.cpp
@@ -1373,7 +1373,7 @@ LogicalResult PerformConcurrentlyOp::verify() {
     // Verify that inserts are into out block arguments.
     Value dest = cast<tensor::ParallelInsertSliceOp>(op).getDest();
     ArrayRef<BlockArgument> regionOutArgs = foreachThreadOp.getRegionOutArgs();
-    if (llvm::find(regionOutArgs, dest) == regionOutArgs.end())
+    if (!llvm::is_contained(regionOutArgs, dest))
       return op.emitOpError("may only insert into an output block argument");
   }
   return success();


        


More information about the Mlir-commits mailing list