]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: don't elide extension for LoadReg to FP register on MIPS64
authorCherry Mui <cherryyz@google.com>
Tue, 18 Jan 2022 23:36:00 +0000 (18:36 -0500)
committerCherry Mui <cherryyz@google.com>
Wed, 19 Jan 2022 15:45:58 +0000 (15:45 +0000)
commitd93ff73ae207763871bee38590242be968b2e743
tree008bebc18e347880095634e6d6cc89fe403d766d
parentca33b34e17b5f4673a40c894a4f807c01d1ecebe
cmd/compile: don't elide extension for LoadReg to FP register on MIPS64

For an extension operation like MOWWreg, if the operand is already
extended, we optimize the second extension out. Usually a LoadReg
of a proper type would come already extended, as a MOVW/MOVWU etc.
instruction does. But for a LoadReg to a floating point register,
the instruction does not do the extension. So we cannot elide the
extension.

Fixes #50671.

Change-Id: Id8991df78d5acdecd3fd6138c558428cbd5f6ba3
Reviewed-on: https://go-review.googlesource.com/c/go/+/379236
Trust: Cherry Mui <cherryyz@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
src/cmd/compile/internal/mips64/ssa.go
test/fixedbugs/issue50671.go [new file with mode: 0644]