[clang] [CIR] Add math and builtin intrinsics support (PR #175233)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 13 14:12:36 PST 2026
================
@@ -1663,6 +1794,12 @@ RValue CIRGenFunction::emitBuiltinExpr(const GlobalDecl &gd, unsigned builtinID,
return emitLibraryCall(*this, fd, e,
cgm.getBuiltinLibFunction(fd, builtinID));
+ // If this is a predefined lib function (e.g. malloc), emit the call
+ // using exactly the normal call path.
+ if (getContext().BuiltinInfo.isPredefinedLibFunction(builtinID))
----------------
adams381 wrote:
This handles target-specific builtins that can have aggregate return values (e.g., `__builtin_arm_mve_vld2q_u32`). When the result is an aggregate and `returnValue` is null, we need to report this as NYI rather than silently producing incorrect code. This matches the pattern in classic codegen.
https://github.com/llvm/llvm-project/pull/175233
More information about the cfe-commits
mailing list