[Mlir-commits] [flang] [llvm] [mlir] [Flang][OpenMP] Implement device clause lowering for target directive (PR #173509)

Kareem Ergawy llvmlistbot at llvm.org
Sun Jan 4 23:10:52 PST 2026


================
@@ -340,7 +340,7 @@ static LogicalResult checkImplementationStatus(Operation &op) {
       result = todo("depend");
   };
   auto checkDevice = [&todo](auto op, LogicalResult &result) {
-    if (op.getDevice())
+    if (op.getDevice() && !isa<omp::TargetOp>(op))
----------------
ergawy wrote:

This change is not needed. I think instead you should add `checkDevice(...)` to `.Case<omp::TargetEnterDataOp, omp::TargetExitDataOp, omp::TargetUpdateOp>` below. Also, we should add a `Case<omp::TargetDataOp>`.

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


More information about the Mlir-commits mailing list