[clang] [CIR] Convert i1 intrinsic results for bool-returning builtins (PR #220576)

Steffen Larsen via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 2 23:54:57 PDT 2026


================
@@ -3074,6 +2740,14 @@ RValue CIRGenFunction::emitBuiltinExpr(const GlobalDecl &gd, unsigned builtinID,
     if (isa<cir::VoidType>(correctedReturnType))
       return RValue::get(nullptr);
 
+    // A bool-returning builtin may back an intrinsic that returns a wider
+    // int; CIR needs those as !cir.bool too.
+    if (fd && fd->getReturnType()->isBooleanType() &&
----------------
steffenlarsen wrote:

My bad! It is indeed redundant and I meant to remove it. It is gone now!

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


More information about the cfe-commits mailing list