summaryrefslogtreecommitdiffstats
path: root/src/cmd/compile/internal/ssa/rewritePPC64latelower.go
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-16 19:23:18 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-16 19:23:18 +0000
commit43a123c1ae6613b3efeed291fa552ecd909d3acf (patch)
treefd92518b7024bc74031f78a1cf9e454b65e73665 /src/cmd/compile/internal/ssa/rewritePPC64latelower.go
parentInitial commit. (diff)
downloadgolang-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/rewritePPC64latelower.go')
-rw-r--r--src/cmd/compile/internal/ssa/rewritePPC64latelower.go49
1 files changed, 49 insertions, 0 deletions
diff --git a/src/cmd/compile/internal/ssa/rewritePPC64latelower.go b/src/cmd/compile/internal/ssa/rewritePPC64latelower.go
new file mode 100644
index 0000000..d687f59
--- /dev/null
+++ b/src/cmd/compile/internal/ssa/rewritePPC64latelower.go
@@ -0,0 +1,49 @@
+// Code generated from _gen/PPC64latelower.rules; DO NOT EDIT.
+// generated with: cd _gen; go run .
+
+package ssa
+
+func rewriteValuePPC64latelower(v *Value) bool {
+ switch v.Op {
+ case OpPPC64ISEL:
+ return rewriteValuePPC64latelower_OpPPC64ISEL(v)
+ }
+ return false
+}
+func rewriteValuePPC64latelower_OpPPC64ISEL(v *Value) bool {
+ v_2 := v.Args[2]
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
+ // match: (ISEL [a] x (MOVDconst [0]) z)
+ // result: (ISELZ [a] x z)
+ for {
+ a := auxIntToInt32(v.AuxInt)
+ x := v_0
+ if v_1.Op != OpPPC64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
+ break
+ }
+ z := v_2
+ v.reset(OpPPC64ISELZ)
+ v.AuxInt = int32ToAuxInt(a)
+ v.AddArg2(x, z)
+ return true
+ }
+ // match: (ISEL [a] (MOVDconst [0]) y z)
+ // result: (ISELZ [a^0x4] y z)
+ for {
+ a := auxIntToInt32(v.AuxInt)
+ if v_0.Op != OpPPC64MOVDconst || auxIntToInt64(v_0.AuxInt) != 0 {
+ break
+ }
+ y := v_1
+ z := v_2
+ v.reset(OpPPC64ISELZ)
+ v.AuxInt = int32ToAuxInt(a ^ 0x4)
+ v.AddArg2(y, z)
+ return true
+ }
+ return false
+}
+func rewriteBlockPPC64latelower(b *Block) bool {
+ return false
+}