1
Fork 0
rust/compiler/rustc_codegen_llvm/src
Jed Brown 0d8a978e8a 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).
2024-10-11 15:32:56 -06:00
..
back Use &raw in the compiler 2024-09-26 20:33:26 -07:00
coverageinfo coverage. Adapt to mcdc mapping formats introduced by llvm 19 2024-10-08 11:15:24 +08:00
debuginfo Use wide pointers consistenly across the compiler 2024-10-04 14:06:48 +02:00
llvm coverage. Adapt to mcdc mapping formats introduced by llvm 19 2024-10-08 11:15:24 +08:00
abi.rs compiler: Factor rustc_target::abi out of cg_llvm 2024-10-08 18:24:56 -07:00
allocator.rs Replace -Z default-hidden-visibility with -Z default-visibility 2024-10-01 22:32:13 +10:00
asm.rs Rollup merge of #130630 - taiki-e:s390x-clobber-abi, r=Amanieu 2024-10-01 17:32:07 +02:00
attributes.rs codegen_ssa: consolidate tied feature checking 2024-09-24 15:48:49 +01:00
base.rs Add warn(unreachable_pub) to rustc_codegen_llvm. 2024-08-16 08:46:57 +10:00
builder.rs compiler: Factor rustc_target::abi out of cg_llvm 2024-10-08 18:24:56 -07:00
callee.rs Streamline hidden visibility setting. 2024-09-19 20:10:42 +10:00
common.rs compiler: Factor rustc_target::abi out of cg_llvm 2024-10-08 18:24:56 -07:00
consts.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
context.rs intrinsics.fmuladdf{16,32,64,128}: expose llvm.fmuladd.* semantics 2024-10-11 15:32:56 -06:00
declare.rs Use Default visibility for rustc-generated C symbol declarations 2024-10-11 08:43:27 +11:00
errors.rs codegen_ssa: consolidate tied feature checking 2024-09-24 15:48:49 +01:00
intrinsic.rs intrinsics.fmuladdf{16,32,64,128}: expose llvm.fmuladd.* semantics 2024-10-11 15:32:56 -06:00
lib.rs Use &raw in the compiler 2024-09-26 20:33:26 -07:00
llvm_util.rs Rollup merge of #130741 - mrkajetanp:detect-b16b16, r=Amanieu 2024-10-10 22:00:48 +02:00
mono_item.rs Reformat some comments. 2024-09-19 20:11:28 +10:00
type_.rs replace some deprecated functions 2024-09-19 09:39:28 +08:00
type_of.rs compiler: Factor rustc_target::abi out of cg_llvm 2024-10-08 18:24:56 -07:00
va_arg.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
value.rs Add warn(unreachable_pub) to rustc_codegen_llvm. 2024-08-16 08:46:57 +10:00