xref: /llvm-project/mlir/test/Dialect/ArmSME/tile-allocation-invalid.mlir (revision 041baf2f60ac3e107399641aea04c77019e7eab8)
1// RUN: mlir-opt %s -convert-scf-to-cf -test-arm-sme-tile-allocation -verify-diagnostics
2
3// Select between tileA and tileB. This is currently unsupported as it would
4// require inserting (runtime) tile moves.
5
6// expected-note@below {{tile operand is: <block argument> of type 'vector<[4]x[4]xi32>'}}
7func.func @selecting_between_different_tiles_is_unsupported(%dest : memref<?x?xi32>, %tileA : vector<[4]x[4]xi32>, %tileB : vector<[4]x[4]xi32>, %cond: i1) {
8  %c0 = arith.constant 0 : index
9  // expected-error@below {{op tile operand allocated to different SME virtial tile (move required)}}
10  %tile = scf.if %cond -> vector<[4]x[4]xi32> {
11    scf.yield %tileA : vector<[4]x[4]xi32>
12  } else {
13    scf.yield %tileB : vector<[4]x[4]xi32>
14  }
15  arm_sme.tile_store %tile, %dest[%c0, %c0] : memref<?x?xi32>, vector<[4]x[4]xi32>
16  return
17}
18