File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
include/mlir/Dialect/Vector/IR Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -2920,8 +2920,8 @@ def Vector_SplatOp : Vector_Op<"splat", [
2920
2920
]> {
2921
2921
let summary = "vector splat or broadcast operation";
2922
2922
let description = [{
2923
- Broadcast the operand to all elements of the result vector. The operand is
2924
- required to be of integer/index/float type.
2923
+ Broadcast the operand to all elements of the result vector. The type of the
2924
+ operand must match the element type of the vector type.
2925
2925
2926
2926
Example:
2927
2927
@@ -2931,8 +2931,7 @@ def Vector_SplatOp : Vector_Op<"splat", [
2931
2931
```
2932
2932
}];
2933
2933
2934
- let arguments = (ins AnyTypeOf<[AnySignlessInteger, Index, AnyFloat],
2935
- "integer/index/float type">:$input);
2934
+ let arguments = (ins AnyType:$input);
2936
2935
let results = (outs AnyVectorOfAnyRank:$aggregate);
2937
2936
2938
2937
let builders = [
Original file line number Diff line number Diff line change @@ -959,13 +959,16 @@ func.func @vector_scan(%0: vector<4x8x16x32xf32>) -> vector<4x8x16x32xf32> {
959
959
}
960
960
961
961
// CHECK-LABEL: func @test_splat_op
962
- // CHECK-SAME: [[S:%arg[0-9]+]]: f32
963
- func.func @test_splat_op (%s : f32 ) {
962
+ // CHECK-SAME: [[S:%arg[0-9]+]]: f32, [[S2:%arg[0-9]+]]: !llvm.ptr<1>
963
+ func.func @test_splat_op (%s : f32 , %s2 : !llvm.ptr < 1 > ) {
964
964
// CHECK: vector.splat [[S]] : vector<8xf32>
965
965
%v = vector.splat %s : vector <8 xf32 >
966
966
967
967
// CHECK: vector.splat [[S]] : vector<4xf32>
968
968
%u = " vector.splat" (%s ) : (f32 ) -> vector <4 xf32 >
969
+
970
+ // CHECK: vector.splat [[S2]] : vector<16x!llvm.ptr<1>>
971
+ %w = vector.splat %s2 : vector <16 x!llvm.ptr <1 >>
969
972
return
970
973
}
971
974
You can’t perform that action at this time.
0 commit comments