@@ -12,6 +12,7 @@ func.func @load_scalar_from_memref(%input: memref<4x8xf32>) -> f32 {
12
12
%value = memref.load %input [%c0 , %c1 ] : memref <4 x8 xf32 >
13
13
return %value : f32
14
14
}
15
+ // CHECK-LABEL: func @load_scalar_from_memref
15
16
16
17
// -----
17
18
@@ -21,13 +22,15 @@ func.func @load_scalar_from_memref_static_dim(%input: memref<4x8xf32, strided<[8
21
22
%value = memref.load %input [%c0 , %c1 ] : memref <4 x8 xf32 , strided <[8 , 12 ], offset : 100 >>
22
23
return %value : f32
23
24
}
25
+ // CHECK-LABEL: func @load_scalar_from_memref_static_dim
24
26
25
27
// -----
26
28
27
29
func.func @load_scalar_from_memref_static_dim_2 (%input: memref <4 x8 xf32 , strided <[8 , 12 ], offset : 100 >>, %row: index , %col: index ) -> f32 {
28
30
%value = memref.load %input [%row , %col ] : memref <4 x8 xf32 , strided <[8 , 12 ], offset : 100 >>
29
31
return %value : f32
30
32
}
33
+ // CHECK-LABEL: func @load_scalar_from_memref_static_dim_2
31
34
32
35
// -----
33
36
@@ -37,34 +40,39 @@ func.func @load_scalar_from_memref_dynamic_dim(%input: memref<4x8xf32, strided<[
37
40
%value = memref.load %input [%c0 , %c1 ] : memref <4 x8 xf32 , strided <[?, ?], offset : ?>>
38
41
return %value : f32
39
42
}
43
+ // CHECK-LABEL: func @load_scalar_from_memref_dynamic_dim
40
44
41
45
// -----
42
46
43
47
func.func @load_scalar_from_memref_dynamic_dim_2 (%input: memref <4 x8 xf32 , strided <[?, ?], offset : ?>>, %row: index , %col: index ) -> f32 {
44
48
%value = memref.load %input [%row , %col ] : memref <4 x8 xf32 , strided <[?, ?], offset : ?>>
45
49
return %value : f32
46
50
}
51
+ // CHECK-LABEL: func @load_scalar_from_memref_dynamic_dim_2
47
52
48
53
// -----
49
54
50
55
func.func @load_scalar_from_memref_subview (%input: memref <4 x8 xf32 >, %row: index , %col: index ) -> memref <1 x1 xf32 , strided <[8 , 1 ], offset : ?>> {
51
56
%subview = memref.subview %input [%row , %col ] [1 , 1 ] [1 , 1 ] : memref <4 x8 xf32 > to memref <1 x1 xf32 , strided <[8 , 1 ], offset : ?>>
52
57
return %subview : memref <1 x1 xf32 , strided <[8 , 1 ], offset : ?>>
53
58
}
59
+ // CHECK-LABEL: func @load_scalar_from_memref_subview
54
60
55
61
// -----
56
62
57
- func.func @load_scalar_from_memref_static_dim_2 (%input: memref <4 x8 xf32 , strided <[8 , 12 ], offset : 100 >>, %row: index , %col: index , %value: f32 ) {
63
+ func.func @store_scalar_from_memref_static_dim_2 (%input: memref <4 x8 xf32 , strided <[8 , 12 ], offset : 100 >>, %row: index , %col: index , %value: f32 ) {
58
64
memref.store %value , %input [%row , %col ] : memref <4 x8 xf32 , strided <[8 , 12 ], offset : 100 >>
59
65
return
60
66
}
67
+ // CHECK-LABEL: func @store_scalar_from_memref_static_dim_2
61
68
62
69
// -----
63
70
64
71
func.func @store_scalar_from_memref_dynamic_dim_2 (%input: memref <4 x8 xf32 , strided <[?, ?], offset : ?>>, %row: index , %col: index , %value: f32 ) {
65
72
memref.store %value , %input [%row , %col ] : memref <4 x8 xf32 , strided <[?, ?], offset : ?>>
66
73
return
67
74
}
75
+ // CHECK-LABEL: func @store_scalar_from_memref_dynamic_dim_2
68
76
69
77
// -----
70
78
@@ -74,6 +82,7 @@ func.func @load_vector_from_memref(%input: memref<4x8xf32>) -> vector<8xf32> {
74
82
%value = vector.load %input [%c3 , %c6 ] : memref <4 x8 xf32 >, vector <8 xf32 >
75
83
return %value : vector <8 xf32 >
76
84
}
85
+ // CHECK-LABEL: func @load_vector_from_memref
77
86
78
87
// -----
79
88
@@ -83,13 +92,15 @@ func.func @load_vector_from_memref_odd(%input: memref<3x7xi2>) -> vector<3xi2> {
83
92
%value = vector.load %input [%c1 , %c3 ] : memref <3 x7 xi2 >, vector <3 xi2 >
84
93
return %value : vector <3 xi2 >
85
94
}
95
+ // CHECK-LABEL: func @load_vector_from_memref_odd
86
96
87
97
// -----
88
98
89
99
func.func @load_vector_from_memref_dynamic (%input: memref <3 x7 xi2 >, %row: index , %col: index ) -> vector <3 xi2 > {
90
100
%value = vector.load %input [%row , %col ] : memref <3 x7 xi2 >, vector <3 xi2 >
91
101
return %value : vector <3 xi2 >
92
102
}
103
+ // CHECK-LABEL: func @load_vector_from_memref_dynamic
93
104
94
105
// -----
95
106
@@ -99,10 +110,12 @@ func.func @store_vector_to_memref_odd(%input: memref<3x7xi2>, %value: vector<3xi
99
110
vector.store %value , %input [%c1 , %c3 ] : memref <3 x7 xi2 >, vector <3 xi2 >
100
111
return
101
112
}
113
+ // CHECK-LABEL: func @store_vector_to_memref_odd
102
114
103
115
// -----
104
116
105
117
func.func @store_vector_to_memref_dynamic (%input: memref <3 x7 xi2 >, %value: vector <3 xi2 >, %row: index , %col: index ) {
106
118
vector.store %value , %input [%row , %col ] : memref <3 x7 xi2 >, vector <3 xi2 >
107
119
return
108
120
}
121
+ // CHECK-LABEL: func @store_vector_to_memref_dynamic
0 commit comments