rust/library
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
..
alloc Rollup merge of #131065 - Voultapher:port-sort-test-suite, r=thomcc 2024-10-11 16:53:47 -05:00
backtrace@230570f2da Try latest backtrace 2024-08-29 12:13:19 -07:00
core Rollup merge of #124874 - jedbrown:float-mul-add-fast, r=saethlin 2024-10-11 23:57:44 -04:00
panic_abort step cfg(bootstrap) 2024-07-28 14:46:29 -04:00
panic_unwind library: Compute RUST_EXCEPTION_CLASS from native-endian bytes 2024-09-26 11:34:17 -07:00
portable-simd stabilize const_intrinsic_copy 2024-09-23 22:12:54 +02:00
proc_macro update Literal's intro 2024-10-02 01:27:11 +08:00
profiler_builtins Don't skip nonexistent source files 2024-08-27 17:30:42 +10:00
rtstartup Let InstCombine remove Clone shims inside Clone shims 2024-07-25 15:14:42 -04:00
rustc-std-workspace-alloc
rustc-std-workspace-core
rustc-std-workspace-std
std rustc_target: Add sme-b16b16 as an explicit aarch64 target feature 2024-10-10 10:24:57 +00:00
stdarch@c881fe3231 stdarch: Bump stdarch submodule 2024-10-10 10:16:16 +00:00
sysroot Auto merge of #125016 - nicholasbishop:bishop-cb-112, r=tgross35 2024-07-29 07:41:33 +00:00
test Dogfood feature(file_buffered) 2024-09-24 14:25:16 -07:00
unwind Use &raw in the standard library 2024-09-25 17:03:20 -07:00
windows_targets Win: Add dbghelp to the list of import libraries 2024-09-06 21:21:49 +00:00
Cargo.lock Update compiler-builtins to 0.1.133 2024-10-05 21:34:51 -05:00
Cargo.toml Auto merge of #129063 - the8472:cold-opt-size, r=Amanieu 2024-09-02 00:58:50 +00:00