|
1 | 1 | // RUN: mlir-opt -convert-xegpu-to-xevm %s | FileCheck %s |
2 | 2 |
|
3 | 3 | gpu.module @load_store_check { |
| 4 | + // CHECK-LABEL: gpu.func @load_store( |
| 5 | + // CHECK-SAME: %[[ARG0:.*]]: memref<8x16xf32, 1>, %[[ARG1:.*]]: memref<8x16xf32, 1>) kernel { |
4 | 6 | gpu.func @load_store(%src: memref<8x16xf32, 1>, %dst: memref<8x16xf32, 1>) kernel { |
5 | 7 | %srcce = memref.memory_space_cast %src : memref<8x16xf32, 1> to memref<8x16xf32> |
6 | 8 | %dstte = memref.memory_space_cast %dst : memref<8x16xf32, 1> to memref<8x16xf32> |
7 | 9 |
|
8 | | - // CHECK: %[[LD_PTR_AS_I64:.*]] = arith.index_castui {{.*}} : index to i64 |
| 10 | + // CHECK: %[[MEMSPACECAST:.*]] = memref.memory_space_cast %[[ARG0]] : memref<8x16xf32, 1> to memref<8x16xf32> |
| 11 | + // CHECK: %[[INTPTR:.*]] = memref.extract_aligned_pointer_as_index %[[MEMSPACECAST]] : memref<8x16xf32> -> index |
| 12 | + // CHECK: %[[LD_PTR_AS_I64:.*]] = arith.index_castui %[[INTPTR]] : index to i64 |
| 13 | + // CHECK: %[[MEMSPACECAST_0:.*]] = memref.memory_space_cast %[[ARG1]] : memref<8x16xf32, 1> to memref<8x16xf32> |
| 14 | + // CHECK: %[[INTPTR_1:.*]] = memref.extract_aligned_pointer_as_index %[[MEMSPACECAST_0]] : memref<8x16xf32> -> index |
| 15 | + // CHECK: %[[ST_PTR_AS_I64:.*]] = arith.index_castui %[[INTPTR_1]] : index to i64 |
9 | 16 | // CHECK: %[[LD_CREATE_DESC_I64:.*]] = vector.bitcast {{.*}} : vector<8xi32> to vector<4xi64> |
10 | 17 | // CHECK: %[[LD_DESC_0:.*]] = vector.insert %[[LD_PTR_AS_I64]], %[[LD_CREATE_DESC_I64]] [0] : i64 into vector<4xi64> |
11 | 18 | // CHECK: %[[LD_DESC_1:.*]] = vector.bitcast %[[LD_DESC_0]] : vector<4xi64> to vector<8xi32> |
@@ -42,9 +49,8 @@ gpu.module @load_store_check { |
42 | 49 | //CHECK: %[[LOADED_F32_MODIFIED:.*]] = vector.insert %{{.*}}, %[[LD_LOADED_F32]] [0] : f32 into vector<8xf32> |
43 | 50 | %loaded_modified = vector.insert %tid_x_f32, %loaded[0] : f32 into vector<8xf32> |
44 | 51 |
|
45 | | - // CHECK: %[[PTR_AS_I64:.*]] = arith.index_castui {{.*}} : index to i64 |
46 | 52 | // CHECK: %[[CREATE_DESC_I64:.*]] = vector.bitcast {{.*}} : vector<8xi32> to vector<4xi64> |
47 | | - // CHECK: %[[DESC_0:.*]] = vector.insert %[[PTR_AS_I64]], %[[CREATE_DESC_I64]] [0] : i64 into vector<4xi64> |
| 53 | + // CHECK: %[[DESC_0:.*]] = vector.insert %[[ST_PTR_AS_I64]], %[[CREATE_DESC_I64]] [0] : i64 into vector<4xi64> |
48 | 54 | // CHECK: %[[DESC_1:.*]] = vector.bitcast %[[DESC_0]] : vector<4xi64> to vector<8xi32> |
49 | 55 | // CHECK: %[[DESC_2:.*]] = vector.insert {{.*}}, %[[DESC_1]] [2] : i32 into vector<8xi32> |
50 | 56 | // CHECK: %[[DESC_3:.*]] = vector.insert {{.*}}, %[[DESC_2]] [3] : i32 into vector<8xi32> |
|
0 commit comments