1 // Code generated from _gen/PPC64latelower.rules using 'go generate'; DO NOT EDIT.
5 import "internal/buildcfg"
7 func rewriteValuePPC64latelower(v *Value) bool {
10 return rewriteValuePPC64latelower_OpPPC64ISEL(v)
12 return rewriteValuePPC64latelower_OpPPC64SETBC(v)
14 return rewriteValuePPC64latelower_OpPPC64SETBCR(v)
18 func rewriteValuePPC64latelower_OpPPC64ISEL(v *Value) bool {
22 // match: (ISEL [a] x (MOVDconst [0]) z)
23 // result: (ISELZ [a] x z)
25 a := auxIntToInt32(v.AuxInt)
27 if v_1.Op != OpPPC64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
32 v.AuxInt = int32ToAuxInt(a)
36 // match: (ISEL [a] (MOVDconst [0]) y z)
37 // result: (ISELZ [a^0x4] y z)
39 a := auxIntToInt32(v.AuxInt)
40 if v_0.Op != OpPPC64MOVDconst || auxIntToInt64(v_0.AuxInt) != 0 {
46 v.AuxInt = int32ToAuxInt(a ^ 0x4)
52 func rewriteValuePPC64latelower_OpPPC64SETBC(v *Value) bool {
55 typ := &b.Func.Config.Types
56 // match: (SETBC [2] cmp)
57 // cond: buildcfg.GOPPC64 <= 9
58 // result: (ISELZ [2] (MOVDconst [1]) cmp)
60 if auxIntToInt32(v.AuxInt) != 2 {
64 if !(buildcfg.GOPPC64 <= 9) {
68 v.AuxInt = int32ToAuxInt(2)
69 v0 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
70 v0.AuxInt = int64ToAuxInt(1)
74 // match: (SETBC [0] cmp)
75 // cond: buildcfg.GOPPC64 <= 9
76 // result: (ISELZ [0] (MOVDconst [1]) cmp)
78 if auxIntToInt32(v.AuxInt) != 0 {
82 if !(buildcfg.GOPPC64 <= 9) {
86 v.AuxInt = int32ToAuxInt(0)
87 v0 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
88 v0.AuxInt = int64ToAuxInt(1)
92 // match: (SETBC [1] cmp)
93 // cond: buildcfg.GOPPC64 <= 9
94 // result: (ISELZ [1] (MOVDconst [1]) cmp)
96 if auxIntToInt32(v.AuxInt) != 1 {
100 if !(buildcfg.GOPPC64 <= 9) {
103 v.reset(OpPPC64ISELZ)
104 v.AuxInt = int32ToAuxInt(1)
105 v0 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
106 v0.AuxInt = int64ToAuxInt(1)
112 func rewriteValuePPC64latelower_OpPPC64SETBCR(v *Value) bool {
115 typ := &b.Func.Config.Types
116 // match: (SETBCR [2] cmp)
117 // cond: buildcfg.GOPPC64 <= 9
118 // result: (ISELZ [6] (MOVDconst [1]) cmp)
120 if auxIntToInt32(v.AuxInt) != 2 {
124 if !(buildcfg.GOPPC64 <= 9) {
127 v.reset(OpPPC64ISELZ)
128 v.AuxInt = int32ToAuxInt(6)
129 v0 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
130 v0.AuxInt = int64ToAuxInt(1)
134 // match: (SETBCR [0] cmp)
135 // cond: buildcfg.GOPPC64 <= 9
136 // result: (ISELZ [4] (MOVDconst [1]) cmp)
138 if auxIntToInt32(v.AuxInt) != 0 {
142 if !(buildcfg.GOPPC64 <= 9) {
145 v.reset(OpPPC64ISELZ)
146 v.AuxInt = int32ToAuxInt(4)
147 v0 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
148 v0.AuxInt = int64ToAuxInt(1)
152 // match: (SETBCR [1] cmp)
153 // cond: buildcfg.GOPPC64 <= 9
154 // result: (ISELZ [5] (MOVDconst [1]) cmp)
156 if auxIntToInt32(v.AuxInt) != 1 {
160 if !(buildcfg.GOPPC64 <= 9) {
163 v.reset(OpPPC64ISELZ)
164 v.AuxInt = int32ToAuxInt(5)
165 v0 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
166 v0.AuxInt = int64ToAuxInt(1)
172 func rewriteBlockPPC64latelower(b *Block) bool {