acc.serial op is modeled on the acc.parallel op.
acc.yield operation must then accept acc.serial has a parent
operation.
Reviewed By: PeteSteinfeld, razvanlupusoru
Differential Revision: https://reviews.llvm.org/D148258
// Yield operation for the acc.loop and acc.parallel operations.
def OpenACC_YieldOp : OpenACC_Op<"yield", [Terminator,
- ParentOneOf<["ParallelOp, LoopOp"]>]> {
+ ParentOneOf<["ParallelOp, LoopOp, SerialOp"]>]> {
let summary = "Acc yield and termination operation";
let description = [{
} attributes {waitAttr}
acc.serial {
} attributes {selfAttr}
+ acc.serial {
+ acc.yield
+ } attributes {selfAttr}
return
}
// CHECK-NEXT: } attributes {waitAttr}
// CHECK: acc.serial {
// CHECK-NEXT: } attributes {selfAttr}
+// CHECK: acc.serial {
+// CHECK: acc.yield
+// CHECK-NEXT: } attributes {selfAttr}
// -----