[llvm-branch-commits] [mlir] [MLIR][OpenMP] Update op verifiers dependent on omp.wsloop (2/5) (PR #89211)

Tom Eccles via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Apr 18 06:15:55 PDT 2024


================
@@ -1977,9 +1977,10 @@ LogicalResult OrderedRegionOp::verify() {
   if (getSimd())
     return failure();
 
-  if (auto container = (*this)->getParentOfType<WsloopOp>()) {
-    if (!container.getOrderedValAttr() ||
-        container.getOrderedValAttr().getInt() != 0)
+  if (auto loopOp = dyn_cast<LoopNestOp>((*this)->getParentOp())) {
----------------
tblah wrote:

Could there be any case where there is another operation in between the OrderedRegionOp and the LoopNestOp? If not, maybe we should check the parent explicitly

https://github.com/llvm/llvm-project/pull/89211


More information about the llvm-branch-commits mailing list