]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: fold constants into immediate instructions on riscv64
authorJoel Sing <joel@sing.id.au>
Mon, 9 Mar 2020 16:31:22 +0000 (03:31 +1100)
committerJoel Sing <joel@sing.id.au>
Wed, 25 Mar 2020 01:40:51 +0000 (01:40 +0000)
commit97585092f590072209110bce336f57506984c02b
treedcbee94d9c0ccf9c13f67c38547b279401489108
parentf4fe89108c42bde3978fda8b826acbcd77db6076
cmd/compile: fold constants into immediate instructions on riscv64

Where possible, fold constants into versions of instructions that take
an immediate. This avoids the need to allocate a register and load the
immediate into it.

Change-Id: If911ca41235e218490679aed2ce5f48bf807a2b3
Reviewed-on: https://go-review.googlesource.com/c/go/+/222639
Run-TryBot: Joel Sing <joel@sing.id.au>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/ssa/gen/RISCV64.rules
src/cmd/compile/internal/ssa/gen/RISCV64Ops.go
src/cmd/compile/internal/ssa/rewriteRISCV64.go