Skip to content

Commit 27ce6e4

Browse files
mundaymgopherbot
authored andcommitted
cmd/compile: remove sign extension before MULW on riscv64
These sign extensions aren't necessary. Change-Id: Id68ea596a18b30949d4605b2885f02e49e42d8e1 Reviewed-on: https://go-review.googlesource.com/c/go/+/699595 Reviewed-by: Keith Randall <[email protected]> Auto-Submit: Keith Randall <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Keith Randall <[email protected]> Reviewed-by: Cherry Mui <[email protected]>
1 parent 84b070b commit 27ce6e4

File tree

2 files changed

+5
-43
lines changed

2 files changed

+5
-43
lines changed

src/cmd/compile/internal/ssa/_gen/RISCV64.rules

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@
1212
(Mul64 ...) => (MUL ...)
1313
(Mul64uhilo ...) => (LoweredMuluhilo ...)
1414
(Mul64uover ...) => (LoweredMuluover ...)
15-
(Mul32 ...) => (MULW ...)
16-
(Mul16 x y) => (MULW (SignExt16to32 x) (SignExt16to32 y))
17-
(Mul8 x y) => (MULW (SignExt8to32 x) (SignExt8to32 y))
15+
(Mul(32|16|8) ...) => (MULW ...)
1816
(Mul(64|32)F ...) => (FMUL(D|S) ...)
1917

2018
(Div(64|32)F ...) => (FDIV(D|S) ...)

src/cmd/compile/internal/ssa/rewriteRISCV64.go

Lines changed: 4 additions & 40 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)