diff options
author | Cherry Mui <cherryyz@google.com> | 2022-02-11 14:58:56 +0000 |
---|---|---|
committer | Cherry Mui <cherryyz@google.com> | 2022-02-11 14:58:56 +0000 |
commit | e90b835f3071f1eb71810a3631b792f23df59f24 (patch) | |
tree | dc5a1c1620f14dbc051402095af9c024bc12a202 /src/cmd/compile/internal/mips64/ssa.go | |
parent | bb93480d009322886df6f5185c988d6d21fdc2c8 (diff) | |
parent | 0a6cf8706fdd0fe1bd26e4d1ecbcd41650bf5e6c (diff) | |
download | go-e90b835f3071f1eb71810a3631b792f23df59f24.tar.gz go-e90b835f3071f1eb71810a3631b792f23df59f24.zip |
[dev.boringcrypto.go1.16] all: merge go1.16.14 into dev.boringcrypto.go1.16
Change-Id: I186a567b3e76df7ecf1842634a3851eab7c9dfce
Diffstat (limited to 'src/cmd/compile/internal/mips64/ssa.go')
-rw-r--r-- | src/cmd/compile/internal/mips64/ssa.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/mips64/ssa.go b/src/cmd/compile/internal/mips64/ssa.go index 2727c4d8a8..b0e0165ad8 100644 --- a/src/cmd/compile/internal/mips64/ssa.go +++ b/src/cmd/compile/internal/mips64/ssa.go @@ -321,7 +321,10 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) { for a.Op == ssa.OpCopy || a.Op == ssa.OpMIPS64MOVVreg { a = a.Args[0] } - if a.Op == ssa.OpLoadReg { + if a.Op == ssa.OpLoadReg && mips.REG_R0 <= a.Reg() && a.Reg() <= mips.REG_R31 { + // LoadReg from a narrower type does an extension, except loading + // to a floating point register. So only eliminate the extension + // if it is loaded to an integer register. t := a.Type switch { case v.Op == ssa.OpMIPS64MOVBreg && t.Size() == 1 && t.IsSigned(), |