]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: change the condition flags of floating-point comparisons in arm64 backend
authorfanzha02 <fannie.zhang@arm.com>
Wed, 20 Feb 2019 11:38:16 +0000 (11:38 +0000)
committerCherry Zhang <cherryyz@google.com>
Thu, 7 Mar 2019 21:23:52 +0000 (21:23 +0000)
commit6efd51c6b768ecb55cd39b0dcb8a43d9a6c8e1b2
treeb1f5e0905b6d4718610e91b75a9c5322f438036d
parenta77f85a61874c05097a60f08d9dda71512d9dcc3
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>
src/cmd/compile/internal/arm64/ssa.go
src/cmd/compile/internal/ssa/gen/ARM64.rules
src/cmd/compile/internal/ssa/gen/ARM64Ops.go
src/cmd/compile/internal/ssa/opGen.go
src/cmd/compile/internal/ssa/rewriteARM64.go
test/codegen/condmove.go