[flang-commits] [flang] [llvm] [mlir] [flang][llvm][OpenMP] Add implicit casts to omp.atomic (PR #131603)

via flang-commits flang-commits at lists.llvm.org
Thu May 1 06:16:03 PDT 2025


================
@@ -2889,9 +2889,55 @@ static void genAtomicRead(lower::AbstractConverter &converter,
       fir::getBase(converter.genExprAddr(fromExpr, stmtCtx));
   mlir::Value toAddress = fir::getBase(converter.genExprAddr(
       *semantics::GetExpr(assignmentStmtVariable), stmtCtx));
-  genAtomicCaptureStatement(converter, fromAddress, toAddress,
-                            leftHandClauseList, rightHandClauseList,
-                            elementType, loc);
+
+  if (fromAddress.getType() != toAddress.getType()) {
----------------
NimishMishra wrote:

Thanks. I have added an explanation for these 

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


More information about the flang-commits mailing list