Skip to content

Fix FMA instruction on LLVM

sheaf requested to merge sheaf/ghc:T24223 into master

We were emitting the wrong instructions for fused multiply-add operations on LLVM:

  • the instruction name is llvm.fma.f32 or llvm.fma.f64, not fmadd
  • LLVM does not support other instructions such as fmsub; instead we implement these by flipping signs of some arguments
  • the instruction is an LLVM intrinsic, which requires handling it like a normal function call instead of a machine instruction
Edited by sheaf

Merge request reports