diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-16 19:23:18 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-16 19:23:18 +0000 |
commit | 43a123c1ae6613b3efeed291fa552ecd909d3acf (patch) | |
tree | fd92518b7024bc74031f78a1cf9e454b65e73665 /src/cmd/compile/internal/ssa/rewriteAMD64latelower.go | |
parent | Initial commit. (diff) | |
download | golang-1.20-43a123c1ae6613b3efeed291fa552ecd909d3acf.tar.xz golang-1.20-43a123c1ae6613b3efeed291fa552ecd909d3acf.zip |
Adding upstream version 1.20.14.upstream/1.20.14upstream
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 | 135 |
1 files changed, 135 insertions, 0 deletions
diff --git a/src/cmd/compile/internal/ssa/rewriteAMD64latelower.go b/src/cmd/compile/internal/ssa/rewriteAMD64latelower.go new file mode 100644 index 0000000..9072257 --- /dev/null +++ b/src/cmd/compile/internal/ssa/rewriteAMD64latelower.go @@ -0,0 +1,135 @@ +// Code generated from _gen/AMD64latelower.rules; DO NOT EDIT. +// generated with: cd _gen; go run . + +package ssa + +import "internal/buildcfg" + +func rewriteValueAMD64latelower(v *Value) bool { + switch v.Op { + case OpAMD64SARL: + return rewriteValueAMD64latelower_OpAMD64SARL(v) + case OpAMD64SARQ: + return rewriteValueAMD64latelower_OpAMD64SARQ(v) + case OpAMD64SHLL: + return rewriteValueAMD64latelower_OpAMD64SHLL(v) + case OpAMD64SHLQ: + return rewriteValueAMD64latelower_OpAMD64SHLQ(v) + case OpAMD64SHRL: + return rewriteValueAMD64latelower_OpAMD64SHRL(v) + case OpAMD64SHRQ: + return rewriteValueAMD64latelower_OpAMD64SHRQ(v) + } + return false +} +func rewriteValueAMD64latelower_OpAMD64SARL(v *Value) bool { + v_1 := v.Args[1] + v_0 := v.Args[0] + // match: (SARL x y) + // cond: buildcfg.GOAMD64 >= 3 + // result: (SARXL x y) + for { + x := v_0 + y := v_1 + if !(buildcfg.GOAMD64 >= 3) { + break + } + v.reset(OpAMD64SARXL) + v.AddArg2(x, y) + return true + } + return false +} +func rewriteValueAMD64latelower_OpAMD64SARQ(v *Value) bool { + v_1 := v.Args[1] + v_0 := v.Args[0] + // match: (SARQ x y) + // cond: buildcfg.GOAMD64 >= 3 + // result: (SARXQ x y) + for { + x := v_0 + y := v_1 + if !(buildcfg.GOAMD64 >= 3) { + break + } + v.reset(OpAMD64SARXQ) + v.AddArg2(x, y) + return true + } + return false +} +func rewriteValueAMD64latelower_OpAMD64SHLL(v *Value) bool { + v_1 := v.Args[1] + v_0 := v.Args[0] + // match: (SHLL x y) + // cond: buildcfg.GOAMD64 >= 3 + // result: (SHLXL x y) + for { + x := v_0 + y := v_1 + if !(buildcfg.GOAMD64 >= 3) { + break + } + v.reset(OpAMD64SHLXL) + v.AddArg2(x, y) + return true + } + return false +} +func rewriteValueAMD64latelower_OpAMD64SHLQ(v *Value) bool { + v_1 := v.Args[1] + v_0 := v.Args[0] + // match: (SHLQ x y) + // cond: buildcfg.GOAMD64 >= 3 + // result: (SHLXQ x y) + for { + x := v_0 + y := v_1 + if !(buildcfg.GOAMD64 >= 3) { + break + } + v.reset(OpAMD64SHLXQ) + v.AddArg2(x, y) + return true + } + return false +} +func rewriteValueAMD64latelower_OpAMD64SHRL(v *Value) bool { + v_1 := v.Args[1] + v_0 := v.Args[0] + // match: (SHRL x y) + // cond: buildcfg.GOAMD64 >= 3 + // result: (SHRXL x y) + for { + x := v_0 + y := v_1 + if !(buildcfg.GOAMD64 >= 3) { + break + } + v.reset(OpAMD64SHRXL) + v.AddArg2(x, y) + return true + } + return false +} +func rewriteValueAMD64latelower_OpAMD64SHRQ(v *Value) bool { + v_1 := v.Args[1] + v_0 := v.Args[0] + // match: (SHRQ x y) + // cond: buildcfg.GOAMD64 >= 3 + // result: (SHRXQ x y) + for { + x := v_0 + y := v_1 + if !(buildcfg.GOAMD64 >= 3) { + break + } + v.reset(OpAMD64SHRXQ) + v.AddArg2(x, y) + return true + } + return false +} +func rewriteBlockAMD64latelower(b *Block) bool { + return false +} |