[Mlir-commits] [mlir] 069ca6f - [mlir] fix compiler error due to commit landing race

Alex Zinenko llvmlistbot at llvm.org
Tue Jun 14 09:04:29 PDT 2022


Author: Alex Zinenko
Date: 2022-06-14T18:04:00+02:00
New Revision: 069ca6f7a36ec2ed588ec78713bc1f73169ea664

URL: https://github.com/llvm/llvm-project/commit/069ca6f7a36ec2ed588ec78713bc1f73169ea664
DIFF: https://github.com/llvm/llvm-project/commit/069ca6f7a36ec2ed588ec78713bc1f73169ea664.diff

LOG: [mlir] fix compiler error due to commit landing race

Added: 
    

Modified: 
    mlir/lib/Dialect/Transform/IR/TransformOps.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/Transform/IR/TransformOps.cpp b/mlir/lib/Dialect/Transform/IR/TransformOps.cpp
index 51956ab9eddc..3037cf65b3a0 100644
--- a/mlir/lib/Dialect/Transform/IR/TransformOps.cpp
+++ b/mlir/lib/Dialect/Transform/IR/TransformOps.cpp
@@ -123,8 +123,8 @@ LogicalResult PatternApplicatorExtension::findAllMatches(
 //===----------------------------------------------------------------------===//
 
 OperandRange
-transform::AlternativesOp::getSuccessorEntryOperands(unsigned index) {
-  if (getOperation()->getNumOperands() == 1)
+transform::AlternativesOp::getSuccessorEntryOperands(Optional<unsigned> index) {
+  if (index.hasValue() && getOperation()->getNumOperands() == 1)
     return getOperation()->getOperands();
   return OperandRange(getOperation()->operand_end(),
                       getOperation()->operand_end());


        


More information about the Mlir-commits mailing list