[flang-commits] [flang] [flang][OpenMP] Add implicit casts for omp.atomic.capture (PR #138163)
Tom Eccles via flang-commits
flang-commits at lists.llvm.org
Fri May 2 06:02:36 PDT 2025
================
@@ -3091,10 +3131,32 @@ static void genAtomicCapture(lower::AbstractConverter &converter,
firOpBuilder.setInsertionPointToStart(&block);
const semantics::SomeExpr &fromExpr = *semantics::GetExpr(stmt1Expr);
mlir::Type elementType = converter.genType(fromExpr);
- genAtomicCaptureStatement(converter, stmt2LHSArg, stmt1LHSArg,
- /*leftHandClauseList=*/nullptr,
- /*rightHandClauseList=*/nullptr, elementType,
- loc);
+
+ if (stmt1VarType != stmt2VarType) {
----------------
tblah wrote:
nit: These blocks look very similar (identical?). Maybe they should go in a helper function?
https://github.com/llvm/llvm-project/pull/138163
More information about the flang-commits
mailing list