# stage1: work around LLVM's buggy fma lowering · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/4ee91bb8a83fbddaf266500196525308525e2605)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 4ee91bb8a83fbddaf266500196525308525e2605

Requested commit: 4ee91bb8a83fbddaf266500196525308525e2605

Commit: 4ee91bb8a83fbddaf266500196525308525e2605

Tree: 5aa0ee6ec57501a7607013cc0a9688341d11f5b8

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
stage1: work around LLVM's buggy fma lowering

 * move fmaq from freestanding libc to compiler_rt, unconditionally
   exported weak_odr.
 * stage1: add fmaf, fmal, fmaq as symbols that compiler-rt might
   generate calls to.
 * stage1: lower `@mulAdd` directly to a call to `fmaq` instead of to
   the LLVM intrinsic because LLVM will lower it to `fmal` even when the
   target's `long double` is not equivalent to `f128`.

This commit is intended to fix the test suite which is failing on the
previous commit.

```

## Parents

- [5e153b53828875a0c5b6c893ff40add07ac0aafd](https://git.cafe/gitcafe/zig/commit/5e153b53828875a0c5b6c893ff40add07ac0aafd?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/4ee91bb8a83fbddaf266500196525308525e2605?format=markdown)
