[clang] [CIR][X86] Implement lowering for `readwritebarrier` builtins (PR #171094)

Haocong Lu via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 8 18:51:16 PST 2025


================
@@ -1352,7 +1352,14 @@ RValue CIRGenFunction::emitBuiltinExpr(const GlobalDecl &gd, unsigned builtinID,
   }
 
   // Now see if we can emit a target-specific builtin.
-  if (mlir::Value v = emitTargetBuiltinExpr(builtinID, e, returnValue)) {
+  if (std::optional<mlir::Value> rst =
+          emitTargetBuiltinExpr(builtinID, e, returnValue)) {
+    mlir::Value v = rst.value();
+    // CIR dialect operations maybe have no results, no value will return
+    // even if it executes successfully.
----------------
Luhaocong wrote:

done

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


More information about the cfe-commits mailing list