diff options
Diffstat (limited to 'mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp')
| -rw-r--r-- | mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp b/mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp index a7285ab8cb15..cf8353a4089e 100644 --- a/mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp +++ b/mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp @@ -546,8 +546,8 @@ static Value allocateGlobalSharedMemory(Location loc, OpBuilder &builder, auto ip = builder.saveInsertionPoint(); builder.setInsertionPoint(moduleOp); - auto global = builder.create<memref::GlobalOp>( - loc, + auto global = memref::GlobalOp::create( + builder, loc, /*sym_name=*/symbolName, /*sym_visibility=*/builder.getStringAttr("private"), /*type=*/memrefType, @@ -560,13 +560,13 @@ static Value allocateGlobalSharedMemory(Location loc, OpBuilder &builder, global->moveBefore(&moduleOp.front()); builder.restoreInsertionPoint(ip); - return builder.create<memref::GetGlobalOp>(loc, memrefType, symbolName); + return memref::GetGlobalOp::create(builder, loc, memrefType, symbolName); } static Value warpReduction(Location loc, OpBuilder &builder, Value input, CombiningKind kind, uint32_t size) { // First reduce on a single thread to get per lane reduction value. - Value laneVal = builder.create<vector::ReductionOp>(loc, kind, input); + Value laneVal = vector::ReductionOp::create(builder, loc, kind, input); // Parallel reduction using butterfly shuffles. for (uint64_t i = 1; i < size; i <<= 1) { Value shuffled = builder @@ -647,9 +647,9 @@ struct TestVectorDistribution "unsupported shuffle type"); Type i32Type = builder.getIntegerType(32); Value srcIdxI32 = - builder.create<arith::IndexCastOp>(loc, i32Type, srcIdx); - Value warpSzI32 = builder.create<arith::ConstantOp>( - loc, builder.getIntegerAttr(i32Type, warpSz)); + arith::IndexCastOp::create(builder, loc, i32Type, srcIdx); + Value warpSzI32 = arith::ConstantOp::create( + builder, loc, builder.getIntegerAttr(i32Type, warpSz)); Value result = builder .create<gpu::ShuffleOp>(loc, val, srcIdxI32, warpSzI32, gpu::ShuffleMode::IDX) @@ -680,7 +680,7 @@ struct TestVectorDistribution options.warpAllocationFn = allocateGlobalSharedMemory; options.warpSyncronizationFn = [](Location loc, OpBuilder &builder, gpu::WarpExecuteOnLane0Op warpOp) { - builder.create<gpu::BarrierOp>(loc); + gpu::BarrierOp::create(builder, loc); }; // Test on one pattern in isolation. if (warpOpToSCF) { |
