]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: use correct type in riscv64 late lower pass
authorWayne Zuo <wdvxdr@golangcn.org>
Wed, 19 Oct 2022 01:10:01 +0000 (09:10 +0800)
committerMeng Zhuo <mzh@golangcn.org>
Mon, 24 Oct 2022 03:45:10 +0000 (03:45 +0000)
commit2952fe4f16666e8ebe433f7505cb52e1cfc56f4b
tree665ac702282ffb504caf2adc30b5d2eb5cebc90c
parent85196fc982ead65ea56c377c2e381eabff329773
cmd/compile: use correct type in riscv64 late lower pass

The right-hand side SLLI always contains valid content in the high 32 bits,
so we should use the 64 bit integer type. Using wrong type may lead to wrong
optimizations in cse pass.

Should fix x/text test failures.

Change-Id: I972dd913b8fb238d180bb12f8b1801adc8503fc0
Reviewed-on: https://go-review.googlesource.com/c/go/+/443875
Reviewed-by: Dmitri Goutnik <dgoutnik@gmail.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Wayne Zuo <wdvxdr@golangcn.org>
Reviewed-by: David Chase <drchase@google.com>
src/cmd/compile/internal/ssa/_gen/RISCV64latelower.rules
src/cmd/compile/internal/ssa/rewriteRISCV64latelower.go