[flang] [llvm] [flang][llvm][OpenMP][OpenACC] Add implicit casts to omp.atomic and acc.atomic (PR #131603)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 9 09:03:24 PDT 2025
================
@@ -386,6 +442,7 @@ void genOmpAccAtomicRead(Fortran::lower::AbstractConverter &converter,
fir::getBase(converter.genExprAddr(fromExpr, stmtCtx));
mlir::Value toAddress = fir::getBase(converter.genExprAddr(
*Fortran::semantics::GetExpr(assignmentStmtVariable), stmtCtx));
+ emitImplicitCast(converter, loc, fromAddress, toAddress, elementType);
----------------
NimishMishra wrote:
> Could you check if we use the `typedAssignmentStatement` (as in `genOmpAccAtomicWrite`) then this conversion code is automatically generated?
Thanks @kiranchandramohan. Using typed statements to generate the expressions actually takes care of the conversion. I am trying to see if we can solve the issue with atomic capture. I will update the PR accordingly.
https://github.com/llvm/llvm-project/pull/131603
More information about the llvm-commits
mailing list