Skip to content

Commit 3b6aedd

Browse files
committed
review comments
Signed-off-by: Benoit Jacob <[email protected]>
1 parent d8e2291 commit 3b6aedd

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

mlir/test/Conversion/VectorToLLVM/vector-to-llvm-interface.mlir

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -808,6 +808,22 @@ func.func @insert_scalar_into_vec_2d_f32_dynamic_idx_scalable(%arg0: vector<1x[1
808808
// CHECK: llvm.insertelement {{.*}} : vector<[16]xf32>
809809
// CHECK: llvm.insertvalue {{.*}} : !llvm.array<1 x vector<[16]xf32>>
810810

811+
812+
// -----
813+
814+
func.func @insert_scalar_into_vec_2d_f32_dynamic_idx_fail(%arg0: vector<2x16xf32>, %arg1: f32, %idx: index)
815+
-> vector<2x16xf32> {
816+
%0 = vector.insert %arg1, %arg0[%idx, 0]: f32 into vector<2x16xf32>
817+
return %0 : vector<2x16xf32>
818+
}
819+
820+
// Currently fails to convert because of the dynamic index in non-innermost
821+
// dimension that converts to a llvm.array, as llvm.extractvalue does not
822+
// support dynamic dimensions
823+
824+
// CHECK-LABEL: @insert_scalar_into_vec_2d_f32_dynamic_idx_fail
825+
// CHECK: vector.insert
826+
811827
// -----
812828

813829
func.func @insert_scalar_from_vec_2d_f32_dynamic_idxs_compile_time_const(%arg : vector<4x1xf32>) -> vector<4x1xf32> {

0 commit comments

Comments
 (0)