cmd/compile: add fma intrinsic for arm

This change introduces an arm intrinsic that generates the FMULAD
instruction for the fused-multiply-add operation on systems that
support it. System support is detected via cpu.ARM.HasVFPv4. A rewrite
rule translates the generic intrinsic to FMULAD.

Updates #25819.

Change-Id: I8459e5dd1cdbdca35f88a78dbeb7d387f1e20efa
Reviewed-on: https://go-review.googlesource.com/c/go/+/142117
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
This commit is contained in:
smasher164 2018-10-15 03:14:57 -04:00 committed by Keith Randall
parent 06ac26279c
commit 58b031949b
12 changed files with 81 additions and 1 deletions

View file

@ -109,6 +109,7 @@ func copysign(a, b, c float64) {
func fma(x, y, z float64) float64 {
// amd64:"VFMADD231SD"
// arm/6:"FMULAD"
// arm64:"FMADDD"
// s390x:"FMADD"
// ppc64:"FMADD"