[Mlir-commits] [mlir] 35e4a28 - Fix MLIR gcc7 build: ambiguous overload from user conversion

Mehdi Amini llvmlistbot at llvm.org
Fri Oct 20 12:16:37 PDT 2023


Author: Mehdi Amini
Date: 2023-10-20T12:16:29-07:00
New Revision: 35e4a28f04209a25638a6ab7eea9760d41ea21b8

URL: https://github.com/llvm/llvm-project/commit/35e4a28f04209a25638a6ab7eea9760d41ea21b8
DIFF: https://github.com/llvm/llvm-project/commit/35e4a28f04209a25638a6ab7eea9760d41ea21b8.diff

LOG: Fix MLIR gcc7 build: ambiguous overload from user conversion

The implicit conversion from an op to a Value is not triggered for some reasons:

/LoopLikeSCFOpsTest.cpp:78:57: error: call of overloaded ‘ValueRange(mlir::arith::ConstantIndexOp)’ is ambiguous
       b.create<scf::ParallelOp>(loc, ValueRange(lb.get()), ValueRange(ub.get()),

explicitly taking the result of the op should solve it.

Added: 
    

Modified: 
    mlir/unittests/Dialect/SCF/LoopLikeSCFOpsTest.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/unittests/Dialect/SCF/LoopLikeSCFOpsTest.cpp b/mlir/unittests/Dialect/SCF/LoopLikeSCFOpsTest.cpp
index f87c28e1876ec6b..a7694dcb45da8bf 100644
--- a/mlir/unittests/Dialect/SCF/LoopLikeSCFOpsTest.cpp
+++ b/mlir/unittests/Dialect/SCF/LoopLikeSCFOpsTest.cpp
@@ -74,9 +74,9 @@ TEST_F(SCFLoopLikeTest, queryUnidimensionalLooplikes) {
       std::nullopt);
   checkUnidimensional(forallOp.get());
 
-  OwningOpRef<scf::ParallelOp> parallelOp =
-      b.create<scf::ParallelOp>(loc, ValueRange(lb.get()), ValueRange(ub.get()),
-                                ValueRange(step.get()), ValueRange());
+  OwningOpRef<scf::ParallelOp> parallelOp = b.create<scf::ParallelOp>(
+      loc, ValueRange(lb->getResult()), ValueRange(ub->getResult()),
+      ValueRange(step->getResult()), ValueRange());
   checkUnidimensional(parallelOp.get());
 }
 


        


More information about the Mlir-commits mailing list