Skip to content

Commit 9c16ef6

Browse files
committed
address comments
1 parent 41edb09 commit 9c16ef6

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

mlir/lib/Dialect/SPIRV/Transforms/RewriteInsertsPass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ void RewriteInsertsPass::runOnOperation() {
8484
LogicalResult RewriteInsertsPass::collectInsertionChain(
8585
spirv::CompositeInsertOp op,
8686
SmallVectorImpl<spirv::CompositeInsertOp> &insertions) {
87-
if (llvm::isa<spirv::CooperativeMatrixType>(op.getComposite().getType()))
87+
if (isa<spirv::CooperativeMatrixType>(op.getComposite().getType()))
8888
return failure();
8989

9090
auto indicesArrayAttr = cast<ArrayAttr>(op.getIndices());

mlir/test/Dialect/SPIRV/Transforms/rewrite-inserts.mlir

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,15 @@ spirv.module Logical GLSL450 {
2929
spirv.ReturnValue %3 : vector<3xf32>
3030
}
3131
}
32+
33+
// -----
34+
35+
spirv.module Logical GLSL450 {
36+
spirv.func @insertCoopMatrix(%value : f32) -> !spirv.coopmatrix<4x4xf32, Subgroup, MatrixA> "None" {
37+
%0 = spirv.Undef : !spirv.coopmatrix<4x4xf32, Subgroup, MatrixA>
38+
// CHECK: spirv.CompositeInsert {{%.*}}, {{%.*}} : f32 into !spirv.coopmatrix<4x4xf32, Subgroup, MatrixA>
39+
%1 = spirv.CompositeInsert %value, %0[0 : i32] : f32 into !spirv.coopmatrix<4x4xf32, Subgroup, MatrixA>
40+
41+
spirv.ReturnValue %1 : !spirv.coopmatrix<4x4xf32, Subgroup, MatrixA>
42+
}
43+
}

0 commit comments

Comments
 (0)