@@ -27,6 +27,15 @@ func.func @vector_splat() -> vector<4xindex> {
2727 func.return %2 : vector <4 xindex >
2828}
2929
30+ // CHECK-LABEL: func @vector_broadcast
31+ // CHECK: test.reflect_bounds {smax = 5 : index, smin = 4 : index, umax = 5 : index, umin = 4 : index}
32+ func.func @vector_broadcast () -> vector <4 x16 xindex > {
33+ %0 = test.with_bounds { umin = 4 : index , umax = 5 : index , smin = 4 : index , smax = 5 : index } : vector <16 xindex >
34+ %1 = vector.broadcast %0 : vector <16 xindex > to vector <4 x16 xindex >
35+ %2 = test.reflect_bounds %1 : vector <4 x16 xindex >
36+ func.return %2 : vector <4 x16 xindex >
37+ }
38+
3039// CHECK-LABEL: func @vector_extract
3140// CHECK: test.reflect_bounds {smax = 6 : index, smin = 5 : index, umax = 6 : index, umin = 5 : index}
3241func.func @vector_extract () -> index {
@@ -55,3 +64,24 @@ func.func @vector_add() -> vector<4xindex> {
5564 %3 = test.reflect_bounds %2 : vector <4 xindex >
5665 func.return %3 : vector <4 xindex >
5766}
67+
68+ // CHECK-LABEL: func @vector_insert
69+ // CHECK: test.reflect_bounds {smax = 8 : index, smin = 5 : index, umax = 8 : index, umin = 5 : index}
70+ func.func @vector_insert () -> vector <4 xindex > {
71+ %0 = test.with_bounds { umin = 5 : index , umax = 7 : index , smin = 5 : index , smax = 7 : index } : vector <4 xindex >
72+ %1 = test.with_bounds { umin = 6 : index , umax = 8 : index , smin = 6 : index , smax = 8 : index } : index
73+ %2 = vector.insert %1 , %0 [0 ] : index into vector <4 xindex >
74+ %3 = test.reflect_bounds %2 : vector <4 xindex >
75+ func.return %3 : vector <4 xindex >
76+ }
77+
78+ // CHECK-LABEL: func @vector_insertelement
79+ // CHECK: test.reflect_bounds {smax = 8 : index, smin = 5 : index, umax = 8 : index, umin = 5 : index}
80+ func.func @vector_insertelement () -> vector <4 xindex > {
81+ %c0 = arith.constant 0 : index
82+ %0 = test.with_bounds { umin = 5 : index , umax = 7 : index , smin = 5 : index , smax = 7 : index } : vector <4 xindex >
83+ %1 = test.with_bounds { umin = 6 : index , umax = 8 : index , smin = 6 : index , smax = 8 : index } : index
84+ %2 = vector.insertelement %1 , %0 [%c0 : index ] : vector <4 xindex >
85+ %3 = test.reflect_bounds %2 : vector <4 xindex >
86+ func.return %3 : vector <4 xindex >
87+ }
0 commit comments