Commit 8fd0f835 authored by Joel Sing's avatar Joel Sing
Browse files

cmd/compile/internal/ssa: correct sign extension for consts on riscv64

Correct sign extension handling for consts on riscv64. This fixes a bug
in part exposed by CL 302609 - previously 64 bit consts were rewritten into
multiple 32 bit consts and the expansion would result in sign/zero extension
not being eliminated. With this change a MOVDconst with a 64 bit value can be
followed by a MOV{B,H,W}reg, which will be eliminated without actually
truncating to a smaller value.

Change-Id: I8d9cd380217466997b341e008a1f139bc11a0d51
Reviewed-on: https://go-review.googlesource.com/c/go/+/303350


Trust: Joel Sing <joel@sing.id.au>
Reviewed-by: default avatarCherry Zhang <cherryyz@google.com>
parent 5437b5a2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment