aboutsummaryrefslogtreecommitdiff
path: root/mlir/test/Dialect/OpenMP/invalid.mlir
diff options
context:
space:
mode:
authorJeff Niu <jeff@modular.com>2022-08-11 03:01:35 -0400
committerJeff Niu <jeff@modular.com>2022-08-11 20:56:45 -0400
commit30171e76f0e5ea8037bc4d1450dd3e12af4d9938 (patch)
treeaf8b6ddbd4625f5924f34c6fd9200c1e84eb608d /mlir/test/Dialect/OpenMP/invalid.mlir
parent2092d1438c36606d82df20fd36f16de033d31147 (diff)
downloadllvm-30171e76f0e5ea8037bc4d1450dd3e12af4d9938.zip
llvm-30171e76f0e5ea8037bc4d1450dd3e12af4d9938.tar.gz
llvm-30171e76f0e5ea8037bc4d1450dd3e12af4d9938.tar.bz2
[mlir] Switch segment size attributes to DenseI32ArrayAttr
Switch variadic operand and result segment size attributes to use the dense i32 array. Dense integer arrays were introduced primarily to represent index lists. They are a better fit for segment sizes than dense elements attrs. Depends on D131738 Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D131702
Diffstat (limited to 'mlir/test/Dialect/OpenMP/invalid.mlir')
-rw-r--r--mlir/test/Dialect/OpenMP/invalid.mlir20
1 files changed, 10 insertions, 10 deletions
diff --git a/mlir/test/Dialect/OpenMP/invalid.mlir b/mlir/test/Dialect/OpenMP/invalid.mlir
index 6e62773..c833bdd 100644
--- a/mlir/test/Dialect/OpenMP/invalid.mlir
+++ b/mlir/test/Dialect/OpenMP/invalid.mlir
@@ -197,8 +197,8 @@ func.func @omp_simdloop(%lb : index, %ub : index, %step : i32) -> () {
"omp.simdloop" (%lb, %ub, %step) ({
^bb0(%iv: index):
omp.yield
- }) {operand_segment_sizes = dense<[1,1,1,0]> : vector<4xi32>} :
- (index, index, i32) -> ()
+ }) {operand_segment_sizes = array<i32: 1,1,1,0>} :
+ (index, index, i32) -> ()
return
}
@@ -985,7 +985,7 @@ func.func @omp_sections(%data_var : memref<i32>) -> () {
// expected-error @below {{expected equal sizes for allocate and allocator variables}}
"omp.sections" (%data_var) ({
omp.terminator
- }) {operand_segment_sizes = dense<[0,1,0]> : vector<3xi32>} : (memref<i32>) -> ()
+ }) {operand_segment_sizes = array<i32: 0,1,0>} : (memref<i32>) -> ()
return
}
@@ -995,7 +995,7 @@ func.func @omp_sections(%data_var : memref<i32>) -> () {
// expected-error @below {{expected as many reduction symbol references as reduction variables}}
"omp.sections" (%data_var) ({
omp.terminator
- }) {operand_segment_sizes = dense<[1,0,0]> : vector<3xi32>} : (memref<i32>) -> ()
+ }) {operand_segment_sizes = array<i32: 1,0,0>} : (memref<i32>) -> ()
return
}
@@ -1110,7 +1110,7 @@ func.func @omp_single(%data_var : memref<i32>) -> () {
// expected-error @below {{expected equal sizes for allocate and allocator variables}}
"omp.single" (%data_var) ({
omp.barrier
- }) {operand_segment_sizes = dense<[1,0]> : vector<2xi32>} : (memref<i32>) -> ()
+ }) {operand_segment_sizes = array<i32: 1,0>} : (memref<i32>) -> ()
return
}
@@ -1302,7 +1302,7 @@ func.func @taskloop(%lb: i32, %ub: i32, %step: i32) {
"omp.taskloop"(%lb, %ub, %ub, %lb, %step, %step, %testmemref) ({
^bb0(%arg3: i32, %arg4: i32):
"omp.terminator"() : () -> ()
- }) {operand_segment_sizes = dense<[2, 2, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0]> : vector<12xi32>} : (i32, i32, i32, i32, i32, i32, memref<i32>) -> ()
+ }) {operand_segment_sizes = array<i32: 2, 2, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0>} : (i32, i32, i32, i32, i32, i32, memref<i32>) -> ()
return
}
@@ -1315,7 +1315,7 @@ func.func @taskloop(%lb: i32, %ub: i32, %step: i32) {
"omp.taskloop"(%lb, %ub, %ub, %lb, %step, %step, %testf32, %testf32_2) ({
^bb0(%arg3: i32, %arg4: i32):
"omp.terminator"() : () -> ()
- }) {operand_segment_sizes = dense<[2, 2, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0]> : vector<12xi32>, reductions = [@add_f32]} : (i32, i32, i32, i32, i32, i32, !llvm.ptr<f32>, !llvm.ptr<f32>) -> ()
+ }) {operand_segment_sizes = array<i32: 2, 2, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0>, reductions = [@add_f32]} : (i32, i32, i32, i32, i32, i32, !llvm.ptr<f32>, !llvm.ptr<f32>) -> ()
return
}
@@ -1328,7 +1328,7 @@ func.func @taskloop(%lb: i32, %ub: i32, %step: i32) {
"omp.taskloop"(%lb, %ub, %ub, %lb, %step, %step, %testf32) ({
^bb0(%arg3: i32, %arg4: i32):
"omp.terminator"() : () -> ()
- }) {operand_segment_sizes = dense<[2, 2, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0]> : vector<12xi32>, reductions = [@add_f32, @add_f32]} : (i32, i32, i32, i32, i32, i32, !llvm.ptr<f32>) -> ()
+ }) {operand_segment_sizes = array<i32: 2, 2, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0>, reductions = [@add_f32, @add_f32]} : (i32, i32, i32, i32, i32, i32, !llvm.ptr<f32>) -> ()
return
}
@@ -1341,7 +1341,7 @@ func.func @taskloop(%lb: i32, %ub: i32, %step: i32) {
"omp.taskloop"(%lb, %ub, %ub, %lb, %step, %step, %testf32, %testf32_2) ({
^bb0(%arg3: i32, %arg4: i32):
"omp.terminator"() : () -> ()
- }) {in_reductions = [@add_f32], operand_segment_sizes = dense<[2, 2, 2, 0, 0, 2, 0, 0, 0, 0, 0, 0]> : vector<12xi32>} : (i32, i32, i32, i32, i32, i32, !llvm.ptr<f32>, !llvm.ptr<f32>) -> ()
+ }) {in_reductions = [@add_f32], operand_segment_sizes = array<i32: 2, 2, 2, 0, 0, 2, 0, 0, 0, 0, 0, 0>} : (i32, i32, i32, i32, i32, i32, !llvm.ptr<f32>, !llvm.ptr<f32>) -> ()
return
}
@@ -1354,7 +1354,7 @@ func.func @taskloop(%lb: i32, %ub: i32, %step: i32) {
"omp.taskloop"(%lb, %ub, %ub, %lb, %step, %step, %testf32_2) ({
^bb0(%arg3: i32, %arg4: i32):
"omp.terminator"() : () -> ()
- }) {in_reductions = [@add_f32, @add_f32], operand_segment_sizes = dense<[2, 2, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0]> : vector<12xi32>} : (i32, i32, i32, i32, i32, i32, !llvm.ptr<f32>) -> ()
+ }) {in_reductions = [@add_f32, @add_f32], operand_segment_sizes = array<i32: 2, 2, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0>} : (i32, i32, i32, i32, i32, i32, !llvm.ptr<f32>) -> ()
return
}