[clang] [CIR] Add math and builtin intrinsics support (PR #175233)

via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 13 14:13:49 PST 2026


================
@@ -1869,8 +1869,7 @@ CIRGenCallee CIRGenFunction::emitDirectCallee(const GlobalDecl &gd) {
 
     bool isPredefinedLibFunction =
         cgm.getASTContext().BuiltinInfo.isPredefinedLibFunction(builtinID);
-    // Assume nobuiltins everywhere until we actually read the attributes.
-    bool hasAttributeNoBuiltin = true;
+    bool hasAttributeNoBuiltin = false;
----------------
adams381 wrote:

You're right that this needs proper attribute handling eventually. The previous value of `true` was overly conservative - it caused functions to be marked as `no_inline` when OGCG doesn't mark them that way. Setting it to `false` matches OGCG's default behavior (builtins are called as builtins unless explicitly disabled). I've added a TODO comment explaining this. The proper fix will be to implement `attributeNoBuiltin` feature to read the actual function attributes.

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


More information about the cfe-commits mailing list