Merge commit '3187d32079b817522cc17413ec9185b130daf693' into subtree-update

This commit is contained in:
Guillaume Gomez
2024-09-27 22:00:17 +02:00
42 changed files with 943 additions and 365 deletions

View File

@@ -168,7 +168,15 @@ fn declare_raw_fn<'gcc>(
variadic: bool,
) -> Function<'gcc> {
if name.starts_with("llvm.") {
let intrinsic = llvm::intrinsic(name, cx);
let intrinsic = match name {
"llvm.fma.f16" => {
// fma is not a target builtin, but a normal builtin, so we handle it differently
// here.
cx.context.get_builtin_function("fma")
}
_ => llvm::intrinsic(name, cx),
};
cx.intrinsics.borrow_mut().insert(name.to_string(), intrinsic);
return intrinsic;
}