diff options
| author | fanzha02 <fannie.zhang@arm.com> | 2019-02-20 11:38:16 +0000 |
|---|---|---|
| committer | Cherry Zhang <cherryyz@google.com> | 2019-03-07 21:23:52 +0000 |
| commit | 6efd51c6b768ecb55cd39b0dcb8a43d9a6c8e1b2 (patch) | |
| tree | b1f5e0905b6d4718610e91b75a9c5322f438036d /test/codegen | |
| parent | a77f85a61874c05097a60f08d9dda71512d9dcc3 (diff) | |
| download | go-6efd51c6b768ecb55cd39b0dcb8a43d9a6c8e1b2.tar.xz | |
cmd/compile: change the condition flags of floating-point comparisons in arm64 backend
Current compiler reverses operands to work around NaN in
"less than" and "less equal than" comparisons. But if we
want to use "FCMPD/FCMPS $(0.0), Fn" to do some optimization,
the workaround way does not work. Because assembler does
not support instruction "FCMPD/FCMPS Fn, $(0.0)".
This CL sets condition flags for floating-point comparisons
to resolve this problem.
Change-Id: Ia48076a1da95da64596d6e68304018cb301ebe33
Reviewed-on: https://go-review.googlesource.com/c/go/+/164718
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Diffstat (limited to 'test/codegen')
| -rw-r--r-- | test/codegen/condmove.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/codegen/condmove.go b/test/codegen/condmove.go index aa82d43f49..3690a54618 100644 --- a/test/codegen/condmove.go +++ b/test/codegen/condmove.go @@ -95,7 +95,7 @@ func cmovfloatint2(x, y float64) float64 { rexp = rexp - 1 } // amd64:"CMOVQHI" - // arm64:"CSEL\tGT" + // arm64:"CSEL\tMI" r = r - ldexp(y, (rexp-yexp)) } return r |
