aboutsummaryrefslogtreecommitdiff
path: root/mlir/test/Dialect/OpenMP/invalid.mlir
diff options
context:
space:
mode:
authorPrabhdeep Singh Soni <prabhdeep.singh.soni2@huawei.com>2022-07-28 23:49:04 +0800
committerPeixin Qiao <qiaopeixin@huawei.com>2022-07-28 23:49:17 +0800
commitf5efa1892e35d15695b8ae9474af3ce8e1d5b8e2 (patch)
tree9576efa6cc89ff18dd7845ab7f6f37c5db586fc6 /mlir/test/Dialect/OpenMP/invalid.mlir
parent75aa52106452a1d15ca487af7b408a812012e133 (diff)
downloadllvm-f5efa1892e35d15695b8ae9474af3ce8e1d5b8e2.zip
llvm-f5efa1892e35d15695b8ae9474af3ce8e1d5b8e2.tar.gz
llvm-f5efa1892e35d15695b8ae9474af3ce8e1d5b8e2.tar.bz2
[Flang][MLIR][OpenMP] Add support for simdlen clause
This supports lowering from parse-tree to MLIR and translation from MLIR to LLVM IR using OMPIRBuilder for OpenMP simdlen clause in SIMD construct. Reviewed By: shraiysh, peixin, arnamoy10 Differential Revision: https://reviews.llvm.org/D130195
Diffstat (limited to 'mlir/test/Dialect/OpenMP/invalid.mlir')
-rw-r--r--mlir/test/Dialect/OpenMP/invalid.mlir10
1 files changed, 10 insertions, 0 deletions
diff --git a/mlir/test/Dialect/OpenMP/invalid.mlir b/mlir/test/Dialect/OpenMP/invalid.mlir
index 8408a5a..6e62773 100644
--- a/mlir/test/Dialect/OpenMP/invalid.mlir
+++ b/mlir/test/Dialect/OpenMP/invalid.mlir
@@ -205,6 +205,16 @@ func.func @omp_simdloop(%lb : index, %ub : index, %step : i32) -> () {
// -----
+func.func @omp_simdloop_pretty_simdlen(%lb : index, %ub : index, %step : index) -> () {
+ // expected-error @below {{op attribute 'simdlen' failed to satisfy constraint: 64-bit signless integer attribute whose value is positive}}
+ omp.simdloop simdlen(0) for (%iv): index = (%lb) to (%ub) step (%step) {
+ omp.yield
+ }
+ return
+}
+
+// -----
+
// expected-error @below {{op expects initializer region with one argument of the reduction type}}
omp.reduction.declare @add_f32 : f64
init {