[clang] [llvm] Don't optimize out no-op atomics in kernel mode (PR #193562)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 24 11:56:10 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 cpp,c -- clang/test/CodeGen/MSKernel/interlocked.c clang/lib/CodeGen/CGBuiltin.cpp llvm/lib/CodeGen/AtomicExpandPass.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/llvm/lib/CodeGen/AtomicExpandPass.cpp b/llvm/lib/CodeGen/AtomicExpandPass.cpp
index 8d0235dbe..732631148 100644
--- a/llvm/lib/CodeGen/AtomicExpandPass.cpp
+++ b/llvm/lib/CodeGen/AtomicExpandPass.cpp
@@ -1684,7 +1684,7 @@ bool AtomicExpandImpl::expandAtomicCmpXchg(AtomicCmpXchgInst *CI) {
bool AtomicExpandImpl::isIdempotentRMW(AtomicRMWInst *RMWI) {
if (RMWI->isVolatile())
return false;
- // TODO: Add floating point support.
+ // TODO: Add floating point support.
auto C = dyn_cast<ConstantInt>(RMWI->getValOperand());
if (!C)
return false;
``````````
</details>
https://github.com/llvm/llvm-project/pull/193562
More information about the cfe-commits
mailing list