diff options
| author | Jed Brown <jed@jedbrown.org> | 2024-01-05 21:04:41 -0700 |
|---|---|---|
| committer | Jed Brown <jed@jedbrown.org> | 2024-10-11 15:32:56 -0600 |
| commit | 058e02cb7315148381b623fa33750ab6c5d741c9 (patch) | |
| tree | 458afd596a50ff7f058a32c440a66839e3d954b7 /tests/codegen/patchable-function-entry | |
| parent | 2ca575348df1ba7b0116dfc5f73a173ef4e168a3 (diff) | |
| download | rust-058e02cb7315148381b623fa33750ab6c5d741c9.tar.gz rust-058e02cb7315148381b623fa33750ab6c5d741c9.zip | |
intrinsics.fmuladdf{16,32,64,128}: expose llvm.fmuladd.* semantics
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).
Diffstat (limited to 'tests/codegen/patchable-function-entry')
0 files changed, 0 insertions, 0 deletions
