mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-29 11:37:39 +00:00
![]() Add intrinsics `fmuladd{f16,f32,f64,f128}`. 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 MIRI support is included for f32 and f64. 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). |
||
---|---|---|
.. | ||
back | ||
intrinsic | ||
abi.rs | ||
allocator.rs | ||
archive.rs | ||
asm.rs | ||
attributes.rs | ||
base.rs | ||
builder.rs | ||
callee.rs | ||
common.rs | ||
consts.rs | ||
context.rs | ||
coverageinfo.rs | ||
debuginfo.rs | ||
declare.rs | ||
errors.rs | ||
gcc_util.rs | ||
int.rs | ||
lib.rs | ||
mono_item.rs | ||
type_.rs | ||
type_of.rs |