================
@@ -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(
+        emitAtomicCmpXchgValue(*this, e, cir::MemOrder::SequentiallyConsistent,
+                               cir::MemOrder::SequentiallyConsistent));
   case Builtin::BI__sync_bool_compare_and_swap:
+    return emitAtomicCmpXchgBool(*this, e);
----------------
Lancern wrote:

Same here, the OGCG contains an `llvm_unreachable` here.

https://github.com/llvm/llvm-project/pull/214606
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to