Files
clang-p2996/mlir/test/Dialect/OpenACC/invalid.mlir
Valentin Clement 01f5fcd829 [mlir][openacc] Add loop op verifier
Add a verifier for the loop op in the OpenACC dialect. Check basic restriction
from 2.9 Loop construct from the OpenACC 3.0 specs.

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D87546
2020-09-15 11:42:08 -04:00

71 lines
1.4 KiB
MLIR

// RUN: mlir-opt -split-input-file -verify-diagnostics %s
// expected-error@+1 {{gang, worker or vector cannot appear with the seq attr}}
acc.loop gang {
"some.op"() : () -> ()
acc.yield
} attributes {seq}
// -----
// expected-error@+1 {{gang, worker or vector cannot appear with the seq attr}}
acc.loop worker {
"some.op"() : () -> ()
acc.yield
} attributes {seq}
// -----
// expected-error@+1 {{gang, worker or vector cannot appear with the seq attr}}
acc.loop vector {
"some.op"() : () -> ()
acc.yield
} attributes {seq}
// -----
// expected-error@+1 {{gang, worker or vector cannot appear with the seq attr}}
acc.loop gang worker {
"some.op"() : () -> ()
acc.yield
} attributes {seq}
// -----
// expected-error@+1 {{gang, worker or vector cannot appear with the seq attr}}
acc.loop gang vector {
"some.op"() : () -> ()
acc.yield
} attributes {seq}
// -----
// expected-error@+1 {{gang, worker or vector cannot appear with the seq attr}}
acc.loop worker vector {
"some.op"() : () -> ()
acc.yield
} attributes {seq}
// -----
// expected-error@+1 {{gang, worker or vector cannot appear with the seq attr}}
acc.loop gang worker vector {
"some.op"() : () -> ()
acc.yield
} attributes {seq}
// -----
// expected-error@+1 {{expected non-empty body.}}
acc.loop {
}
// -----
// expected-error@+1 {{only one of auto, independent, seq can be present at the same time}}
acc.loop {
acc.yield
} attributes {auto_, seq}
// -----