Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ordering for FMA and change FMS to FNMA #81

Merged
merged 1 commit into from
Sep 12, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions proposals/relaxed-simd/Overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,19 +163,19 @@ def relaxed_i32x4_trunc_f64x2_zero_u(a : f64x2) -> i32x4:
result[i] = r
```

### Relaxed fused multiply-add and fused multiply-subtract
### Relaxed fused multiply-add and fused negative multiply-add

- `relaxed f32x4.fma`
- `relaxed f32x4.fms`
- `relaxed f32x4.fnma`
- `relaxed f64x2.fma`
- `relaxed f64x2.fms`
- `relaxed f64x2.fnma`

All the instructions take 3 operands, `a`, `b`, `c`, perform `a + (b * c)` or `a - (b * c)`:
All the instructions take 3 operands, `a`, `b`, `c`, perform `a * b + c` or `-(a * b) + c`:

- `relaxed f32x4.fma(a, b, c) = a + (b * c)`
- `relaxed f32x4.fms(a, b, c) = a - (b * c)`
- `relaxed f64x2.fma(a, b, c) = a + (b * c)`
- `relaxed f64x2.fms(a, b, c) = a - (b * c)`
- `relaxed f32x4.fma(a, b, c) = a * b + c`
- `relaxed f32x4.fnma(a, b, c) = -(a * b) + c`
- `relaxed f64x2.fma(a, b, c) = a * b + c`
- `relaxed f64x2.fnma(a, b, c) = -(a * b) + c`

where:

Expand Down