]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: fix zero extend after float->int conversion
authorKeith Randall <keithr@alum.mit.edu>
Thu, 10 May 2018 17:15:52 +0000 (10:15 -0700)
committerKeith Randall <khr@golang.org>
Thu, 10 May 2018 17:32:43 +0000 (17:32 +0000)
commit599f56dc0502d36d9dcae73c72ed114a41d1ecc0
treebdcfae76f0e6141420e7aee7097d241195366fa6
parentef24fd739bcf94e3f703af324afdeefa6577dc74
cmd/compile: fix zero extend after float->int conversion

Don't do direct loads from argument slots if the sizes don't match.
This prevents us from loading from a float32 using a uint64 load
during expressions like uint64(math.float32Bits(f)) where f is a float32 arg.

Fixes #25322

Change-Id: I3887d76f78c844ba546243e7721d811c3d4a9700
Reviewed-on: https://go-review.googlesource.com/112637
Run-TryBot: Keith Randall <khr@golang.org>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/cmd/compile/internal/ssa/gen/AMD64.rules
src/cmd/compile/internal/ssa/gen/AMD64Ops.go
src/cmd/compile/internal/ssa/rewriteAMD64.go
test/fixedbugs/issue25322.go [new file with mode: 0644]
test/fixedbugs/issue25322.out [new file with mode: 0644]