[all-commits] [llvm/llvm-project] d66a19: [CIR] Correct 2 lowering bugs of atomic cmp-xchng ...

Erich Keane via All-commits all-commits at lists.llvm.org
Mon Sep 28 12:35:19 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d66a1931ed18ee715090b87fc778e619ec8e2a42
      https://github.com/llvm/llvm-project/commit/d66a1931ed18ee715090b87fc778e619ec8e2a42
  Author: Erich Keane <ekeane at nvidia.com>
  Date:   2026-09-28 (Mon, 28 Sep 2026)

  Changed paths:
    M clang/lib/CIR/CodeGen/CIRGenAtomic.cpp
    M clang/test/CIR/CodeGen/atomic.c

  Log Message:
  -----------
  [CIR] Correct 2 lowering bugs of atomic cmp-xchng builtins (#227054)

This patch fixese two bugs that showed up in a benchmark.

First; convertToAtomicIntPointer was zero-filling the source object
directly, rather than the temporary. The result was that anything that
would not be overwritten thanks to the power-of-2 write, would be
incorrect, and corrupted.

Second; emitAtomicCmpXchg didn't set the 'old' value back into the real
object. This ends up doing an additional argument on this function that
better matches classic-codegen.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list