[Mlir-commits] [mlir] [flang][OpenMP] Process `omp.atomic.update` while translating scopes for target device (PR #132165)

Kareem Ergawy llvmlistbot at llvm.org
Thu Mar 20 06:52:51 PDT 2025


================
@@ -5340,9 +5377,10 @@ convertTargetOpsInNest(Operation *op, llvm::IRBuilderBase &builder,
               // translation of the OpenMP construct being converted (e.g. no
               // OpenMP runtime calls will be generated). We just need this to
               // prepare the kernel invocation args.
+              SmallVector<llvm::PHINode *> phis;
               auto result = convertOmpOpRegions(
                   region, oper->getName().getStringRef().str() + ".fake.region",
-                  builder, moduleTranslation);
+                  builder, moduleTranslation, &phis);
----------------
ergawy wrote:

Yes, since `omp.atomic.update` yields values (which are not used in this context), `convertOmpOpRegions` asserts unless we pass a vector to collect the phis.

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


More information about the Mlir-commits mailing list