]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: fix store-to-load forwarding of 32-bit sNaNs
authorMichael Munday <mike.munday@ibm.com>
Mon, 3 Sep 2018 11:14:31 +0000 (12:14 +0100)
committerMichael Munday <mike.munday@ibm.com>
Wed, 5 Sep 2018 15:27:15 +0000 (15:27 +0000)
commit48af3a8be593d349d7af8e831e26b5b2798a464e
tree8fcb5ffea0f752c56cd1fd343fe2954f1d64c37f
parent067dfce21f945646b9e6bf2a7559eaaecf40b4d6
cmd/compile: fix store-to-load forwarding of 32-bit sNaNs

Signalling NaNs were being converted to quiet NaNs during constant
propagation through integer <-> float store-to-load forwarding.
This occurs because we store float32 constants as float64
values and CPU hardware 'quietens' NaNs during conversion between
the two.

Eventually we want to move to using float32 values to store float32
constants, however this will be a big change since both the compiler
and the assembler expect float64 values. So for now this is a small
change that will fix the immediate issue.

Fixes #27193.

Change-Id: Iac54bd8c13abe26f9396712bc71f9b396f842724
Reviewed-on: https://go-review.googlesource.com/132956
Run-TryBot: Michael Munday <mike.munday@ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/gc/float_test.go
src/cmd/compile/internal/ssa/check.go
src/cmd/compile/internal/ssa/gen/generic.rules
src/cmd/compile/internal/ssa/rewrite.go
src/cmd/compile/internal/ssa/rewritegeneric.go