[Mlir-commits] [mlir] [MLIR][OpenMP] NFC: Remove redundant check (PR #91594)

Sergio Afonso llvmlistbot at llvm.org
Thu May 9 06:47:37 PDT 2024


https://github.com/skatrak created https://github.com/llvm/llvm-project/pull/91594

The check removed by this patch in the OpenMP to LLVM IR translation pass already exists as part of the op verifier for `omp.loop_nest`.

>From c5ece7954e6308349baf91cb9991050986b55bfa Mon Sep 17 00:00:00 2001
From: Sergio Afonso <safonsof at amd.com>
Date: Thu, 9 May 2024 14:44:14 +0100
Subject: [PATCH] [MLIR][OpenMP] NFC: Remove redundant check

The check removed by this patch in the OpenMP to LLVM IR translation pass
already exists as part of the op verifier for `omp.loop_nest`.
---
 .../LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp       | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp b/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
index bfd7d65912bdb..69ad18f84c783 100644
--- a/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
+++ b/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
@@ -925,10 +925,6 @@ convertOmpWsloop(Operation &opInst, llvm::IRBuilderBase &builder,
   auto loopOp = cast<omp::LoopNestOp>(wsloopOp.getWrappedLoop());
   const bool isByRef = wsloopOp.getByref();
 
-  // TODO: this should be in the op verifier instead.
-  if (loopOp.getLowerBound().empty())
-    return failure();
-
   // Static is the default.
   auto schedule =
       wsloopOp.getScheduleVal().value_or(omp::ClauseScheduleKind::Static);



More information about the Mlir-commits mailing list