[mlir][linalg] Fix Windows build
authorMatthias Springer <springerm@google.com>
Thu, 15 Jul 2021 01:55:22 +0000 (10:55 +0900)
committerMatthias Springer <springerm@google.com>
Thu, 15 Jul 2021 01:56:30 +0000 (10:56 +0900)
The build failure was introduced by D105458. (Linux builds were not affected.)

Differential Revision: https://reviews.llvm.org/D106029

mlir/lib/Dialect/Linalg/Utils/Utils.cpp

index d582c53..1620a04 100644 (file)
@@ -603,10 +603,14 @@ Value makeTiledShape(OpBuilder &builder, Location loc, Value valueToTile,
   }
 
   Operation *sliceOp = shapedType.isa<MemRefType>()
-                           ? builder.create<memref::SubViewOp>(
-                                 loc, valueToTile, offsets, sizes, strides)
-                           : builder.create<tensor::ExtractSliceOp>(
-                                 loc, valueToTile, offsets, sizes, strides);
+                           ? builder
+                                 .create<memref::SubViewOp>(
+                                     loc, valueToTile, offsets, sizes, strides)
+                                 .getOperation()
+                           : builder
+                                 .create<tensor::ExtractSliceOp>(
+                                     loc, valueToTile, offsets, sizes, strides)
+                                 .getOperation();
   return sliceOp->getResult(0);
 }