[clang] [Clang] Fix clang to emit llvm-ir for fadd/fsub atomics (PR #162679)

via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 6 06:06:51 PST 2025


================
@@ -0,0 +1,123 @@
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 6
+// RUN: %clang_cc1 %s -emit-llvm -o - -triple=aarch64-linux-gnu | FileCheck %s --check-prefix=CHECK-LLVM
+
+_Atomic(float) f;
----------------
CarolineConcatto wrote:


Do you mind adding more tests:

void test_float_add(_Atomic(float) val) {
 _Atomic(float) f;
  f += val;
}

Just in case what happens if we have:
void test_float_add(_Atomic(float) val) {
 _Atomic(float) f;
  f = f + val;
}

https://github.com/llvm/llvm-project/pull/162679


More information about the cfe-commits mailing list