rust/src
Trevor Gross 3f9aa50b70
Rollup merge of #124874 - jedbrown:float-mul-add-fast, r=saethlin
intrinsics fmuladdf{32,64}: expose llvm.fmuladd.* semantics

Add intrinsics `fmuladd{f32,f64}`. This computes `(a * b) + c`, to be fused if the code generator determines that (i) the target instruction set has support for a fused operation, and (ii) that the fused operation is more efficient than the equivalent, separate pair of `mul` and `add` instructions.

https://llvm.org/docs/LangRef.html#llvm-fmuladd-intrinsic

The codegen_cranelift uses the `fma` function from libc, which is a correct implementation, but without the desired performance semantic. I think this requires an update to cranelift to expose a suitable instruction in its IR.

I have not tested with codegen_gcc, but it should behave the same way (using `fma` from libc).

---
This topic has been discussed a few times on Zulip and was suggested, for example, by `@workingjubilee` in [Effect of fma disabled](https://rust-lang.zulipchat.com/#narrow/stream/122651-general/topic/Effect.20of.20fma.20disabled/near/274179331).
2024-10-11 23:57:44 -04:00
..
bootstrap Rollup merge of #131305 - onur-ozkan:131303, r=Kobzol 2024-10-11 17:46:11 +11:00
ci move dummy commit logic into x86_64-gnu-llvm-18 2024-10-11 15:30:51 +03:00
doc Update books 2024-10-07 13:01:01 -04:00
etc bootstrap: Consolidate editor LSP setup 2024-10-03 15:22:44 +01:00
gcc@fd3498bff0 Update GCC version 2024-09-06 16:01:46 +02:00
librustdoc Rollup merge of #130078 - its-the-shrimp:rustdoc-types-compress-ids, r=aDotInTheVoid 2024-10-11 16:53:46 -05:00
llvm-project@dd46457da7 Update to LLVM 19.1.1 2024-10-05 21:10:04 +08:00
rustdoc-json-types Rollup merge of #130078 - its-the-shrimp:rustdoc-types-compress-ids, r=aDotInTheVoid 2024-10-11 16:53:46 -05:00
tools Rollup merge of #124874 - jedbrown:float-mul-add-fast, r=saethlin 2024-10-11 23:57:44 -04:00
README.md
stage0 Bump stage0 2024-09-22 19:04:19 -04:00
version Bump to 1.83 2024-08-30 19:58:04 +01:00

This directory contains some source code for the Rust project, including:

  • The bootstrapping build system
  • Various submodules for tools, like cargo, tidy, etc.

For more information on how various parts of the compiler work, see the rustc dev guide.