[clang] [CIR] Implement missing __sync_* atomic builtins (PR #214606)
Sirui Mu via cfe-commits
cfe-commits at lists.llvm.org
Sun Aug 16 07:22:37 PDT 2026
================
@@ -2063,11 +2120,19 @@ RValue CIRGenFunction::emitBuiltinExpr(const GlobalDecl &gd, unsigned builtinID,
case Builtin::BI__sync_xor_and_fetch:
case Builtin::BI__sync_nand_and_fetch:
case Builtin::BI__sync_val_compare_and_swap:
+ return RValue::get(
----------------
Lancern wrote:
The OGCG contains an `llvm_unreachable` here instead. Looks like sema would transform all `__sync_val_compare_and_swap` to `__sync_val_compare_and_swap_2/4/8/16`. Let's follow the OGCG's approach.
https://github.com/llvm/llvm-project/pull/214606
More information about the cfe-commits
mailing list