diff options
author | Ben Shi <powerman1st@163.com> | 2018-02-22 13:55:01 +0000 |
---|---|---|
committer | Cherry Zhang <cherryyz@google.com> | 2018-02-22 15:28:08 +0000 |
commit | 7113d3a512b17d1acea0904a2e5590fdfbd388bb (patch) | |
tree | 3102fab75bd30d8d884afaa359098f6cc2e679b9 /src/cmd/compile/internal/ssa/gen/ARM64Ops.go | |
parent | ef3ab3f5e2e612532733b3cdd38eefa387595fe3 (diff) | |
download | go-7113d3a512b17d1acea0904a2e5590fdfbd388bb.tar.gz go-7113d3a512b17d1acea0904a2e5590fdfbd388bb.zip |
cmd/compile: fix FP accuracy issue introduced by FMA optimization on ARM64
Two ARM64 rules are added to avoid FP accuracy issue, which causes
build failure.
https://build.golang.org/log/1360f5c9ef3f37968216350283c1013e9681725d
fixes #24033
Change-Id: I9b74b584ab5cc53fa49476de275dc549adf97610
Reviewed-on: https://go-review.googlesource.com/96355
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/cmd/compile/internal/ssa/gen/ARM64Ops.go')
-rw-r--r-- | src/cmd/compile/internal/ssa/gen/ARM64Ops.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cmd/compile/internal/ssa/gen/ARM64Ops.go b/src/cmd/compile/internal/ssa/gen/ARM64Ops.go index 1d70c4e864..d712988bec 100644 --- a/src/cmd/compile/internal/ssa/gen/ARM64Ops.go +++ b/src/cmd/compile/internal/ssa/gen/ARM64Ops.go @@ -216,6 +216,8 @@ func init() { {name: "CLZW", argLength: 1, reg: gp11, asm: "CLZW"}, // count leading zero, 32-bit {name: "VCNT", argLength: 1, reg: fp11, asm: "VCNT"}, // count set bits for each 8-bit unit and store the result in each 8-bit unit {name: "VUADDLV", argLength: 1, reg: fp11, asm: "VUADDLV"}, // unsigned sum of eight bytes in a 64-bit value, zero extended to 64-bit. + {name: "LoweredRound32F", argLength: 1, reg: fp11, resultInArg0: true}, + {name: "LoweredRound64F", argLength: 1, reg: fp11, resultInArg0: true}, // 3-operand, the addend comes first {name: "FMADDS", argLength: 3, reg: fp31, asm: "FMADDS"}, // +arg0 + (arg1 * arg2) |