================
@@ -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() &&
----------------
andykaylor wrote:

Why do we need the cast? Did the correctedReturnType do that?

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

Reply via email to