diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-16 19:27:12 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-16 19:27:12 +0000 |
commit | 0e07b82b3b3ec5af236400610939724e137f8e90 (patch) | |
tree | 1ff52042665843a28e0cf521c79aa33f5d52709e /src/cmd/compile/internal/ssa/rewriteAMD64latelower.go | |
parent | Releasing progress-linux version 1.22.1-1~progress7.99u1. (diff) | |
download | golang-1.22-0e07b82b3b3ec5af236400610939724e137f8e90.tar.xz golang-1.22-0e07b82b3b3ec5af236400610939724e137f8e90.zip |
Merging upstream version 1.22.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/cmd/compile/internal/ssa/rewriteAMD64latelower.go')
-rw-r--r-- | src/cmd/compile/internal/ssa/rewriteAMD64latelower.go | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/src/cmd/compile/internal/ssa/rewriteAMD64latelower.go b/src/cmd/compile/internal/ssa/rewriteAMD64latelower.go index d3dd263..11ecb0b 100644 --- a/src/cmd/compile/internal/ssa/rewriteAMD64latelower.go +++ b/src/cmd/compile/internal/ssa/rewriteAMD64latelower.go @@ -6,6 +6,12 @@ import "internal/buildcfg" func rewriteValueAMD64latelower(v *Value) bool { switch v.Op { + case OpAMD64MOVBQZX: + return rewriteValueAMD64latelower_OpAMD64MOVBQZX(v) + case OpAMD64MOVLQZX: + return rewriteValueAMD64latelower_OpAMD64MOVLQZX(v) + case OpAMD64MOVWQZX: + return rewriteValueAMD64latelower_OpAMD64MOVWQZX(v) case OpAMD64SARL: return rewriteValueAMD64latelower_OpAMD64SARL(v) case OpAMD64SARQ: @@ -21,6 +27,51 @@ func rewriteValueAMD64latelower(v *Value) bool { } return false } +func rewriteValueAMD64latelower_OpAMD64MOVBQZX(v *Value) bool { + v_0 := v.Args[0] + // match: (MOVBQZX x) + // cond: zeroUpper56Bits(x,3) + // result: x + for { + x := v_0 + if !(zeroUpper56Bits(x, 3)) { + break + } + v.copyOf(x) + return true + } + return false +} +func rewriteValueAMD64latelower_OpAMD64MOVLQZX(v *Value) bool { + v_0 := v.Args[0] + // match: (MOVLQZX x) + // cond: zeroUpper32Bits(x,3) + // result: x + for { + x := v_0 + if !(zeroUpper32Bits(x, 3)) { + break + } + v.copyOf(x) + return true + } + return false +} +func rewriteValueAMD64latelower_OpAMD64MOVWQZX(v *Value) bool { + v_0 := v.Args[0] + // match: (MOVWQZX x) + // cond: zeroUpper48Bits(x,3) + // result: x + for { + x := v_0 + if !(zeroUpper48Bits(x, 3)) { + break + } + v.copyOf(x) + return true + } + return false +} func rewriteValueAMD64latelower_OpAMD64SARL(v *Value) bool { v_1 := v.Args[1] v_0 := v.Args[0] |