[flang-commits] [flang] [mlir] [Flang] [OpenMP] atomic compare (PR #184761)
via flang-commits
flang-commits at lists.llvm.org
Tue Mar 17 10:02:51 PDT 2026
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions h,cpp -- flang/include/flang/Lower/ConvertType.h flang/lib/Lower/ConvertExprToHLFIR.cpp flang/lib/Lower/ConvertType.cpp flang/lib/Lower/OpenMP/Atomic.cpp mlir/include/mlir/Dialect/OpenACCMPCommon/Interfaces/AtomicInterfaces.h mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp b/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
index 4c34fe348..549edd23b 100644
--- a/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
+++ b/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
@@ -4532,8 +4532,7 @@ convertOmpAtomicCompare(omp::AtomicCompareOp atomicCompareOp,
auto materializeValue = [&](mlir::Value val) -> llvm::Value * {
if (auto loadOp = val.getDefiningOp<LLVM::LoadOp>()) {
if (loadOp->getParentRegion() == ®ion) {
- llvm::Value *loadAddr =
- moduleTranslation.lookupValue(loadOp.getAddr());
+ llvm::Value *loadAddr = moduleTranslation.lookupValue(loadOp.getAddr());
llvm::Type *loadType =
moduleTranslation.convertType(loadOp.getResult().getType());
return builder.CreateLoad(loadType, loadAddr);
``````````
</details>
https://github.com/llvm/llvm-project/pull/184761
More information about the flang-commits
mailing list