diff options
author | Cherry Zhang <cherryyz@google.com> | 2020-10-28 09:12:20 -0400 |
---|---|---|
committer | Cherry Zhang <cherryyz@google.com> | 2020-10-28 09:12:20 -0400 |
commit | a16e30d162c1c7408db7821e7b9513cefa09c6ca (patch) | |
tree | af752ba9ba44c547df39bb0af9bff79f610ba9d5 /src/cmd/compile/internal/ssa/rewriteARM64.go | |
parent | 91e4d2d57bc341dd82c98247117114c851380aef (diff) | |
parent | cf6cfba4d5358404dd890f6025e573a4b2156543 (diff) | |
download | go-git-dev.link.tar.gz |
[dev.link] all: merge branch 'master' into dev.linkdev.link
Clean merge.
Change-Id: Ia7b2808bc649790198d34c226a61d9e569084dc5
Diffstat (limited to 'src/cmd/compile/internal/ssa/rewriteARM64.go')
-rw-r--r-- | src/cmd/compile/internal/ssa/rewriteARM64.go | 394 |
1 files changed, 218 insertions, 176 deletions
diff --git a/src/cmd/compile/internal/ssa/rewriteARM64.go b/src/cmd/compile/internal/ssa/rewriteARM64.go index 6c48812121..774e2ead68 100644 --- a/src/cmd/compile/internal/ssa/rewriteARM64.go +++ b/src/cmd/compile/internal/ssa/rewriteARM64.go @@ -424,6 +424,8 @@ func rewriteValueARM64(v *Value) bool { case OpAtomicAdd64Variant: v.Op = OpARM64LoweredAtomicAdd64Variant return true + case OpAtomicAnd32: + return rewriteValueARM64_OpAtomicAnd32(v) case OpAtomicAnd8: return rewriteValueARM64_OpAtomicAnd8(v) case OpAtomicCompareAndSwap32: @@ -450,6 +452,8 @@ func rewriteValueARM64(v *Value) bool { case OpAtomicLoadPtr: v.Op = OpARM64LDAR return true + case OpAtomicOr32: + return rewriteValueARM64_OpAtomicOr32(v) case OpAtomicOr8: return rewriteValueARM64_OpAtomicOr8(v) case OpAtomicStore32: @@ -4888,7 +4892,7 @@ func rewriteValueARM64_OpARM64MADD(v *Value) bool { return true } // match: (MADD a x (MOVDconst [c])) - // cond: isPowerOfTwo(c) + // cond: isPowerOfTwo64(c) // result: (ADDshiftLL a x [log2(c)]) for { a := v_0 @@ -4897,7 +4901,7 @@ func rewriteValueARM64_OpARM64MADD(v *Value) bool { break } c := auxIntToInt64(v_2.AuxInt) - if !(isPowerOfTwo(c)) { + if !(isPowerOfTwo64(c)) { break } v.reset(OpARM64ADDshiftLL) @@ -4906,7 +4910,7 @@ func rewriteValueARM64_OpARM64MADD(v *Value) bool { return true } // match: (MADD a x (MOVDconst [c])) - // cond: isPowerOfTwo(c-1) && c>=3 + // cond: isPowerOfTwo64(c-1) && c>=3 // result: (ADD a (ADDshiftLL <x.Type> x x [log2(c-1)])) for { a := v_0 @@ -4915,7 +4919,7 @@ func rewriteValueARM64_OpARM64MADD(v *Value) bool { break } c := auxIntToInt64(v_2.AuxInt) - if !(isPowerOfTwo(c-1) && c >= 3) { + if !(isPowerOfTwo64(c-1) && c >= 3) { break } v.reset(OpARM64ADD) @@ -4926,7 +4930,7 @@ func rewriteValueARM64_OpARM64MADD(v *Value) bool { return true } // match: (MADD a x (MOVDconst [c])) - // cond: isPowerOfTwo(c+1) && c>=7 + // cond: isPowerOfTwo64(c+1) && c>=7 // result: (SUB a (SUBshiftLL <x.Type> x x [log2(c+1)])) for { a := v_0 @@ -4935,7 +4939,7 @@ func rewriteValueARM64_OpARM64MADD(v *Value) bool { break } c := auxIntToInt64(v_2.AuxInt) - if !(isPowerOfTwo(c+1) && c >= 7) { + if !(isPowerOfTwo64(c+1) && c >= 7) { break } v.reset(OpARM64SUB) @@ -4946,7 +4950,7 @@ func rewriteValueARM64_OpARM64MADD(v *Value) bool { return true } // match: (MADD a x (MOVDconst [c])) - // cond: c%3 == 0 && isPowerOfTwo(c/3) + // cond: c%3 == 0 && isPowerOfTwo64(c/3) // result: (SUBshiftLL a (SUBshiftLL <x.Type> x x [2]) [log2(c/3)]) for { a := v_0 @@ -4955,7 +4959,7 @@ func rewriteValueARM64_OpARM64MADD(v *Value) bool { break } c := auxIntToInt64(v_2.AuxInt) - if !(c%3 == 0 && isPowerOfTwo(c/3)) { + if !(c%3 == 0 && isPowerOfTwo64(c/3)) { break } v.reset(OpARM64SUBshiftLL) @@ -4967,7 +4971,7 @@ func rewriteValueARM64_OpARM64MADD(v *Value) bool { return true } // match: (MADD a x (MOVDconst [c])) - // cond: c%5 == 0 && isPowerOfTwo(c/5) + // cond: c%5 == 0 && isPowerOfTwo64(c/5) // result: (ADDshiftLL a (ADDshiftLL <x.Type> x x [2]) [log2(c/5)]) for { a := v_0 @@ -4976,7 +4980,7 @@ func rewriteValueARM64_OpARM64MADD(v *Value) bool { break } c := auxIntToInt64(v_2.AuxInt) - if !(c%5 == 0 && isPowerOfTwo(c/5)) { + if !(c%5 == 0 && isPowerOfTwo64(c/5)) { break } v.reset(OpARM64ADDshiftLL) @@ -4988,7 +4992,7 @@ func rewriteValueARM64_OpARM64MADD(v *Value) bool { return true } // match: (MADD a x (MOVDconst [c])) - // cond: c%7 == 0 && isPowerOfTwo(c/7) + // cond: c%7 == 0 && isPowerOfTwo64(c/7) // result: (SUBshiftLL a (SUBshiftLL <x.Type> x x [3]) [log2(c/7)]) for { a := v_0 @@ -4997,7 +5001,7 @@ func rewriteValueARM64_OpARM64MADD(v *Value) bool { break } c := auxIntToInt64(v_2.AuxInt) - if !(c%7 == 0 && isPowerOfTwo(c/7)) { + if !(c%7 == 0 && isPowerOfTwo64(c/7)) { break } v.reset(OpARM64SUBshiftLL) @@ -5009,7 +5013,7 @@ func rewriteValueARM64_OpARM64MADD(v *Value) bool { return true } // match: (MADD a x (MOVDconst [c])) - // cond: c%9 == 0 && isPowerOfTwo(c/9) + // cond: c%9 == 0 && isPowerOfTwo64(c/9) // result: (ADDshiftLL a (ADDshiftLL <x.Type> x x [3]) [log2(c/9)]) for { a := v_0 @@ -5018,7 +5022,7 @@ func rewriteValueARM64_OpARM64MADD(v *Value) bool { break } c := auxIntToInt64(v_2.AuxInt) - if !(c%9 == 0 && isPowerOfTwo(c/9)) { + if !(c%9 == 0 && isPowerOfTwo64(c/9)) { break } v.reset(OpARM64ADDshiftLL) @@ -5064,7 +5068,7 @@ func rewriteValueARM64_OpARM64MADD(v *Value) bool { return true } // match: (MADD a (MOVDconst [c]) x) - // cond: isPowerOfTwo(c) + // cond: isPowerOfTwo64(c) // result: (ADDshiftLL a x [log2(c)]) for { a := v_0 @@ -5073,7 +5077,7 @@ func rewriteValueARM64_OpARM64MADD(v *Value) bool { } c := auxIntToInt64(v_1.AuxInt) x := v_2 - if !(isPowerOfTwo(c)) { + if !(isPowerOfTwo64(c)) { break } v.reset(OpARM64ADDshiftLL) @@ -5082,7 +5086,7 @@ func rewriteValueARM64_OpARM64MADD(v *Value) bool { return true } // match: (MADD a (MOVDconst [c]) x) - // cond: isPowerOfTwo(c-1) && c>=3 + // cond: isPowerOfTwo64(c-1) && c>=3 // result: (ADD a (ADDshiftLL <x.Type> x x [log2(c-1)])) for { a := v_0 @@ -5091,7 +5095,7 @@ func rewriteValueARM64_OpARM64MADD(v *Value) bool { } c := auxIntToInt64(v_1.AuxInt) x := v_2 - if !(isPowerOfTwo(c-1) && c >= 3) { + if !(isPowerOfTwo64(c-1) && c >= 3) { break } v.reset(OpARM64ADD) @@ -5102,7 +5106,7 @@ func rewriteValueARM64_OpARM64MADD(v *Value) bool { return true } // match: (MADD a (MOVDconst [c]) x) - // cond: isPowerOfTwo(c+1) && c>=7 + // cond: isPowerOfTwo64(c+1) && c>=7 // result: (SUB a (SUBshiftLL <x.Type> x x [log2(c+1)])) for { a := v_0 @@ -5111,7 +5115,7 @@ func rewriteValueARM64_OpARM64MADD(v *Value) bool { } c := auxIntToInt64(v_1.AuxInt) x := v_2 - if !(isPowerOfTwo(c+1) && c >= 7) { + if !(isPowerOfTwo64(c+1) && c >= 7) { break } v.reset(OpARM64SUB) @@ -5122,7 +5126,7 @@ func rewriteValueARM64_OpARM64MADD(v *Value) bool { return true } // match: (MADD a (MOVDconst [c]) x) - // cond: c%3 == 0 && isPowerOfTwo(c/3) + // cond: c%3 == 0 && isPowerOfTwo64(c/3) // result: (SUBshiftLL a (SUBshiftLL <x.Type> x x [2]) [log2(c/3)]) for { a := v_0 @@ -5131,7 +5135,7 @@ func rewriteValueARM64_OpARM64MADD(v *Value) bool { } c := auxIntToInt64(v_1.AuxInt) x := v_2 - if !(c%3 == 0 && isPowerOfTwo(c/3)) { + if !(c%3 == 0 && isPowerOfTwo64(c/3)) { break } v.reset(OpARM64SUBshiftLL) @@ -5143,7 +5147,7 @@ func rewriteValueARM64_OpARM64MADD(v *Value) bool { return true } // match: (MADD a (MOVDconst [c]) x) - // cond: c%5 == 0 && isPowerOfTwo(c/5) + // cond: c%5 == 0 && isPowerOfTwo64(c/5) // result: (ADDshiftLL a (ADDshiftLL <x.Type> x x [2]) [log2(c/5)]) for { a := v_0 @@ -5152,7 +5156,7 @@ func rewriteValueARM64_OpARM64MADD(v *Value) bool { } c := auxIntToInt64(v_1.AuxInt) x := v_2 - if !(c%5 == 0 && isPowerOfTwo(c/5)) { + if !(c%5 == 0 && isPowerOfTwo64(c/5)) { break } v.reset(OpARM64ADDshiftLL) @@ -5164,7 +5168,7 @@ func rewriteValueARM64_OpARM64MADD(v *Value) bool { return true } // match: (MADD a (MOVDconst [c]) x) - // cond: c%7 == 0 && isPowerOfTwo(c/7) + // cond: c%7 == 0 && isPowerOfTwo64(c/7) // result: (SUBshiftLL a (SUBshiftLL <x.Type> x x [3]) [log2(c/7)]) for { a := v_0 @@ -5173,7 +5177,7 @@ func rewriteValueARM64_OpARM64MADD(v *Value) bool { } c := auxIntToInt64(v_1.AuxInt) x := v_2 - if !(c%7 == 0 && isPowerOfTwo(c/7)) { + if !(c%7 == 0 && isPowerOfTwo64(c/7)) { break } v.reset(OpARM64SUBshiftLL) @@ -5185,7 +5189,7 @@ func rewriteValueARM64_OpARM64MADD(v *Value) bool { return true } // match: (MADD a (MOVDconst [c]) x) - // cond: c%9 == 0 && isPowerOfTwo(c/9) + // cond: c%9 == 0 && isPowerOfTwo64(c/9) // result: (ADDshiftLL a (ADDshiftLL <x.Type> x x [3]) [log2(c/9)]) for { a := v_0 @@ -5194,7 +5198,7 @@ func rewriteValueARM64_OpARM64MADD(v *Value) bool { } c := auxIntToInt64(v_1.AuxInt) x := v_2 - if !(c%9 == 0 && isPowerOfTwo(c/9)) { + if !(c%9 == 0 && isPowerOfTwo64(c/9)) { break } v.reset(OpARM64ADDshiftLL) @@ -5295,7 +5299,7 @@ func rewriteValueARM64_OpARM64MADDW(v *Value) bool { return true } // match: (MADDW a x (MOVDconst [c])) - // cond: isPowerOfTwo(c) + // cond: isPowerOfTwo64(c) // result: (ADDshiftLL a x [log2(c)]) for { a := v_0 @@ -5304,7 +5308,7 @@ func rewriteValueARM64_OpARM64MADDW(v *Value) bool { break } c := auxIntToInt64(v_2.AuxInt) - if !(isPowerOfTwo(c)) { + if !(isPowerOfTwo64(c)) { break } v.reset(OpARM64ADDshiftLL) @@ -5313,7 +5317,7 @@ func rewriteValueARM64_OpARM64MADDW(v *Value) bool { return true } // match: (MADDW a x (MOVDconst [c])) - // cond: isPowerOfTwo(c-1) && int32(c)>=3 + // cond: isPowerOfTwo64(c-1) && int32(c)>=3 // result: (ADD a (ADDshiftLL <x.Type> x x [log2(c-1)])) for { a := v_0 @@ -5322,7 +5326,7 @@ func rewriteValueARM64_OpARM64MADDW(v *Value) bool { break } c := auxIntToInt64(v_2.AuxInt) - if !(isPowerOfTwo(c-1) && int32(c) >= 3) { + if !(isPowerOfTwo64(c-1) && int32(c) >= 3) { break } v.reset(OpARM64ADD) @@ -5333,7 +5337,7 @@ func rewriteValueARM64_OpARM64MADDW(v *Value) bool { return true } // match: (MADDW a x (MOVDconst [c])) - // cond: isPowerOfTwo(c+1) && int32(c)>=7 + // cond: isPowerOfTwo64(c+1) && int32(c)>=7 // result: (SUB a (SUBshiftLL <x.Type> x x [log2(c+1)])) for { a := v_0 @@ -5342,7 +5346,7 @@ func rewriteValueARM64_OpARM64MADDW(v *Value) bool { break } c := auxIntToInt64(v_2.AuxInt) - if !(isPowerOfTwo(c+1) && int32(c) >= 7) { + if !(isPowerOfTwo64(c+1) && int32(c) >= 7) { break } v.reset(OpARM64SUB) @@ -5353,7 +5357,7 @@ func rewriteValueARM64_OpARM64MADDW(v *Value) bool { return true } // match: (MADDW a x (MOVDconst [c])) - // cond: c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c) + // cond: c%3 == 0 && isPowerOfTwo64(c/3) && is32Bit(c) // result: (SUBshiftLL a (SUBshiftLL <x.Type> x x [2]) [log2(c/3)]) for { a := v_0 @@ -5362,7 +5366,7 @@ func rewriteValueARM64_OpARM64MADDW(v *Value) bool { break } c := auxIntToInt64(v_2.AuxInt) - if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) { + if !(c%3 == 0 && isPowerOfTwo64(c/3) && is32Bit(c)) { break } v.reset(OpARM64SUBshiftLL) @@ -5374,7 +5378,7 @@ func rewriteValueARM64_OpARM64MADDW(v *Value) bool { return true } // match: (MADDW a x (MOVDconst [c])) - // cond: c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c) + // cond: c%5 == 0 && isPowerOfTwo64(c/5) && is32Bit(c) // result: (ADDshiftLL a (ADDshiftLL <x.Type> x x [2]) [log2(c/5)]) for { a := v_0 @@ -5383,7 +5387,7 @@ func rewriteValueARM64_OpARM64MADDW(v *Value) bool { break } c := auxIntToInt64(v_2.AuxInt) - if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) { + if !(c%5 == 0 && isPowerOfTwo64(c/5) && is32Bit(c)) { break } v.reset(OpARM64ADDshiftLL) @@ -5395,7 +5399,7 @@ func rewriteValueARM64_OpARM64MADDW(v *Value) bool { return true } // match: (MADDW a x (MOVDconst [c])) - // cond: c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c) + // cond: c%7 == 0 && isPowerOfTwo64(c/7) && is32Bit(c) // result: (SUBshiftLL a (SUBshiftLL <x.Type> x x [3]) [log2(c/7)]) for { a := v_0 @@ -5404,7 +5408,7 @@ func rewriteValueARM64_OpARM64MADDW(v *Value) bool { break } c := auxIntToInt64(v_2.AuxInt) - if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) { + if !(c%7 == 0 && isPowerOfTwo64(c/7) && is32Bit(c)) { break } v.reset(OpARM64SUBshiftLL) @@ -5416,7 +5420,7 @@ func rewriteValueARM64_OpARM64MADDW(v *Value) bool { return true } // match: (MADDW a x (MOVDconst [c])) - // cond: c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c) + // cond: c%9 == 0 && isPowerOfTwo64(c/9) && is32Bit(c) // result: (ADDshiftLL a (ADDshiftLL <x.Type> x x [3]) [log2(c/9)]) for { a := v_0 @@ -5425,7 +5429,7 @@ func rewriteValueARM64_OpARM64MADDW(v *Value) bool { break } c := auxIntToInt64(v_2.AuxInt) - if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) { + if !(c%9 == 0 && isPowerOfTwo64(c/9) && is32Bit(c)) { break } v.reset(OpARM64ADDshiftLL) @@ -5486,7 +5490,7 @@ func rewriteValueARM64_OpARM64MADDW(v *Value) bool { return true } // match: (MADDW a (MOVDconst [c]) x) - // cond: isPowerOfTwo(c) + // cond: isPowerOfTwo64(c) // result: (ADDshiftLL a x [log2(c)]) for { a := v_0 @@ -5495,7 +5499,7 @@ func rewriteValueARM64_OpARM64MADDW(v *Value) bool { } c := auxIntToInt64(v_1.AuxInt) x := v_2 - if !(isPowerOfTwo(c)) { + if !(isPowerOfTwo64(c)) { break } v.reset(OpARM64ADDshiftLL) @@ -5504,7 +5508,7 @@ func rewriteValueARM64_OpARM64MADDW(v *Value) bool { return true } // match: (MADDW a (MOVDconst [c]) x) - // cond: isPowerOfTwo(c-1) && int32(c)>=3 + // cond: isPowerOfTwo64(c-1) && int32(c)>=3 // result: (ADD a (ADDshiftLL <x.Type> x x [log2(c-1)])) for { a := v_0 @@ -5513,7 +5517,7 @@ func rewriteValueARM64_OpARM64MADDW(v *Value) bool { } c := auxIntToInt64(v_1.AuxInt) x := v_2 - if !(isPowerOfTwo(c-1) && int32(c) >= 3) { + if !(isPowerOfTwo64(c-1) && int32(c) >= 3) { break } v.reset(OpARM64ADD) @@ -5524,7 +5528,7 @@ func rewriteValueARM64_OpARM64MADDW(v *Value) bool { return true } // match: (MADDW a (MOVDconst [c]) x) - // cond: isPowerOfTwo(c+1) && int32(c)>=7 + // cond: isPowerOfTwo64(c+1) && int32(c)>=7 // result: (SUB a (SUBshiftLL <x.Type> x x [log2(c+1)])) for { a := v_0 @@ -5533,7 +5537,7 @@ func rewriteValueARM64_OpARM64MADDW(v *Value) bool { } c := auxIntToInt64(v_1.AuxInt) x := v_2 - if !(isPowerOfTwo(c+1) && int32(c) >= 7) { + if !(isPowerOfTwo64(c+1) && int32(c) >= 7) { break } v.reset(OpARM64SUB) @@ -5544,7 +5548,7 @@ func rewriteValueARM64_OpARM64MADDW(v *Value) bool { return true } // match: (MADDW a (MOVDconst [c]) x) - // cond: c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c) + // cond: c%3 == 0 && isPowerOfTwo64(c/3) && is32Bit(c) // result: (SUBshiftLL a (SUBshiftLL <x.Type> x x [2]) [log2(c/3)]) for { a := v_0 @@ -5553,7 +5557,7 @@ func rewriteValueARM64_OpARM64MADDW(v *Value) bool { } c := auxIntToInt64(v_1.AuxInt) x := v_2 - if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) { + if !(c%3 == 0 && isPowerOfTwo64(c/3) && is32Bit(c)) { break } v.reset(OpARM64SUBshiftLL) @@ -5565,7 +5569,7 @@ func rewriteValueARM64_OpARM64MADDW(v *Value) bool { return true } // match: (MADDW a (MOVDconst [c]) x) - // cond: c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c) + // cond: c%5 == 0 && isPowerOfTwo64(c/5) && is32Bit(c) // result: (ADDshiftLL a (ADDshiftLL <x.Type> x x [2]) [log2(c/5)]) for { a := v_0 @@ -5574,7 +5578,7 @@ func rewriteValueARM64_OpARM64MADDW(v *Value) bool { } c := auxIntToInt64(v_1.AuxInt) x := v_2 - if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) { + if !(c%5 == 0 && isPowerOfTwo64(c/5) && is32Bit(c)) { break } v.reset(OpARM64ADDshiftLL) @@ -5586,7 +5590,7 @@ func rewriteValueARM64_OpARM64MADDW(v *Value) bool { return true } // match: (MADDW a (MOVDconst [c]) x) - // cond: c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c) + // cond: c%7 == 0 && isPowerOfTwo64(c/7) && is32Bit(c) // result: (SUBshiftLL a (SUBshiftLL <x.Type> x x [3]) [log2(c/7)]) for { a := v_0 @@ -5595,7 +5599,7 @@ func rewriteValueARM64_OpARM64MADDW(v *Value) bool { } c := auxIntToInt64(v_1.AuxInt) x := v_2 - if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) { + if !(c%7 == 0 && isPowerOfTwo64(c/7) && is32Bit(c)) { break } v.reset(OpARM64SUBshiftLL) @@ -5607,7 +5611,7 @@ func rewriteValueARM64_OpARM64MADDW(v *Value) bool { return true } // match: (MADDW a (MOVDconst [c]) x) - // cond: c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c) + // cond: c%9 == 0 && isPowerOfTwo64(c/9) && is32Bit(c) // result: (ADDshiftLL a (ADDshiftLL <x.Type> x x [3]) [log2(c/9)]) for { a := v_0 @@ -5616,7 +5620,7 @@ func rewriteValueARM64_OpARM64MADDW(v *Value) bool { } c := auxIntToInt64(v_1.AuxInt) x := v_2 - if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) { + if !(c%9 == 0 && isPowerOfTwo64(c/9) && is32Bit(c)) { break } v.reset(OpARM64ADDshiftLL) @@ -5707,7 +5711,7 @@ func rewriteValueARM64_OpARM64MNEG(v *Value) bool { break } // match: (MNEG x (MOVDconst [c])) - // cond: isPowerOfTwo(c) + // cond: isPowerOfTwo64(c) // result: (NEG (SLLconst <x.Type> [log2(c)] x)) for { for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 { @@ -5716,7 +5720,7 @@ func rewriteValueARM64_OpARM64MNEG(v *Value) bool { continue } c := auxIntToInt64(v_1.AuxInt) - if !(isPowerOfTwo(c)) { + if !(isPowerOfTwo64(c)) { continue } v.reset(OpARM64NEG) @@ -5729,7 +5733,7 @@ func rewriteValueARM64_OpARM64MNEG(v *Value) bool { break } // match: (MNEG x (MOVDconst [c])) - // cond: isPowerOfTwo(c-1) && c >= 3 + // cond: isPowerOfTwo64(c-1) && c >= 3 // result: (NEG (ADDshiftLL <x.Type> x x [log2(c-1)])) for { for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 { @@ -5738,7 +5742,7 @@ func rewriteValueARM64_OpARM64MNEG(v *Value) bool { continue } c := auxIntToInt64(v_1.AuxInt) - if !(isPowerOfTwo(c-1) && c >= 3) { + if !(isPowerOfTwo64(c-1) && c >= 3) { continue } v.reset(OpARM64NEG) @@ -5751,7 +5755,7 @@ func rewriteValueARM64_OpARM64MNEG(v *Value) bool { break } // match: (MNEG x (MOVDconst [c])) - // cond: isPowerOfTwo(c+1) && c >= 7 + // cond: isPowerOfTwo64(c+1) && c >= 7 // result: (NEG (ADDshiftLL <x.Type> (NEG <x.Type> x) x [log2(c+1)])) for { for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 { @@ -5760,7 +5764,7 @@ func rewriteValueARM64_OpARM64MNEG(v *Value) bool { continue } c := auxIntToInt64(v_1.AuxInt) - if !(isPowerOfTwo(c+1) && c >= 7) { + if !(isPowerOfTwo64(c+1) && c >= 7) { continue } v.reset(OpARM64NEG) @@ -5775,7 +5779,7 @@ func rewriteValueARM64_OpARM64MNEG(v *Value) bool { break } // match: (MNEG x (MOVDconst [c])) - // cond: c%3 == 0 && isPowerOfTwo(c/3) + // cond: c%3 == 0 && isPowerOfTwo64(c/3) // result: (SLLconst <x.Type> [log2(c/3)] (SUBshiftLL <x.Type> x x [2])) for { for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 { @@ -5784,7 +5788,7 @@ func rewriteValueARM64_OpARM64MNEG(v *Value) bool { continue } c := auxIntToInt64(v_1.AuxInt) - if !(c%3 == 0 && isPowerOfTwo(c/3)) { + if !(c%3 == 0 && isPowerOfTwo64(c/3)) { continue } v.reset(OpARM64SLLconst) @@ -5799,7 +5803,7 @@ func rewriteValueARM64_OpARM64MNEG(v *Value) bool { break } // match: (MNEG x (MOVDconst [c])) - // cond: c%5 == 0 && isPowerOfTwo(c/5) + // cond: c%5 == 0 && isPowerOfTwo64(c/5) // result: (NEG (SLLconst <x.Type> [log2(c/5)] (ADDshiftLL <x.Type> x x [2]))) for { for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 { @@ -5808,7 +5812,7 @@ func rewriteValueARM64_OpARM64MNEG(v *Value) bool { continue } c := auxIntToInt64(v_1.AuxInt) - if !(c%5 == 0 && isPowerOfTwo(c/5)) { + if !(c%5 == 0 && isPowerOfTwo64(c/5)) { continue } v.reset(OpARM64NEG) @@ -5824,7 +5828,7 @@ func rewriteValueARM64_OpARM64MNEG(v *Value) bool { break } // match: (MNEG x (MOVDconst [c])) - // cond: c%7 == 0 && isPowerOfTwo(c/7) + // cond: c%7 == 0 && isPowerOfTwo64(c/7) // result: (SLLconst <x.Type> [log2(c/7)] (SUBshiftLL <x.Type> x x [3])) for { for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 { @@ -5833,7 +5837,7 @@ func rewriteValueARM64_OpARM64MNEG(v *Value) bool { continue } c := auxIntToInt64(v_1.AuxInt) - if !(c%7 == 0 && isPowerOfTwo(c/7)) { + if !(c%7 == 0 && isPowerOfTwo64(c/7)) { continue } v.reset(OpARM64SLLconst) @@ -5848,7 +5852,7 @@ func rewriteValueARM64_OpARM64MNEG(v *Value) bool { break } // match: (MNEG x (MOVDconst [c])) - // cond: c%9 == 0 && isPowerOfTwo(c/9) + // cond: c%9 == 0 && isPowerOfTwo64(c/9) // result: (NEG (SLLconst <x.Type> [log2(c/9)] (ADDshiftLL <x.Type> x x [3]))) for { for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 { @@ -5857,7 +5861,7 @@ func rewriteValueARM64_OpARM64MNEG(v *Value) bool { continue } c := auxIntToInt64(v_1.AuxInt) - if !(c%9 == 0 && isPowerOfTwo(c/9)) { + if !(c%9 == 0 && isPowerOfTwo64(c/9)) { continue } v.reset(OpARM64NEG) @@ -5952,7 +5956,7 @@ func rewriteValueARM64_OpARM64MNEGW(v *Value) bool { break } // match: (MNEGW x (MOVDconst [c])) - // cond: isPowerOfTwo(c) + // cond: isPowerOfTwo64(c) // result: (NEG (SLLconst <x.Type> [log2(c)] x)) for { for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 { @@ -5961,7 +5965,7 @@ func rewriteValueARM64_OpARM64MNEGW(v *Value) bool { continue } c := auxIntToInt64(v_1.AuxInt) - if !(isPowerOfTwo(c)) { + if !(isPowerOfTwo64(c)) { continue } v.reset(OpARM64NEG) @@ -5974,7 +5978,7 @@ func rewriteValueARM64_OpARM64MNEGW(v *Value) bool { break } // match: (MNEGW x (MOVDconst [c])) - // cond: isPowerOfTwo(c-1) && int32(c) >= 3 + // cond: isPowerOfTwo64(c-1) && int32(c) >= 3 // result: (NEG (ADDshiftLL <x.Type> x x [log2(c-1)])) for { for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 { @@ -5983,7 +5987,7 @@ func rewriteValueARM64_OpARM64MNEGW(v *Value) bool { continue } c := auxIntToInt64(v_1.AuxInt) - if !(isPowerOfTwo(c-1) && int32(c) >= 3) { + if !(isPowerOfTwo64(c-1) && int32(c) >= 3) { continue } v.reset(OpARM64NEG) @@ -5996,7 +6000,7 @@ func rewriteValueARM64_OpARM64MNEGW(v *Value) bool { break } // match: (MNEGW x (MOVDconst [c])) - // cond: isPowerOfTwo(c+1) && int32(c) >= 7 + // cond: isPowerOfTwo64(c+1) && int32(c) >= 7 // result: (NEG (ADDshiftLL <x.Type> (NEG <x.Type> x) x [log2(c+1)])) for { for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 { @@ -6005,7 +6009,7 @@ func rewriteValueARM64_OpARM64MNEGW(v *Value) bool { continue } c := auxIntToInt64(v_1.AuxInt) - if !(isPowerOfTwo(c+1) && int32(c) >= 7) { + if !(isPowerOfTwo64(c+1) && int32(c) >= 7) { continue } v.reset(OpARM64NEG) @@ -6020,7 +6024,7 @@ func rewriteValueARM64_OpARM64MNEGW(v *Value) bool { break } // match: (MNEGW x (MOVDconst [c])) - // cond: c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c) + // cond: c%3 == 0 && isPowerOfTwo64(c/3) && is32Bit(c) // result: (SLLconst <x.Type> [log2(c/3)] (SUBshiftLL <x.Type> x x [2])) for { for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 { @@ -6029,7 +6033,7 @@ func rewriteValueARM64_OpARM64MNEGW(v *Value) bool { continue } c := auxIntToInt64(v_1.AuxInt) - if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) { + if !(c%3 == 0 && isPowerOfTwo64(c/3) && is32Bit(c)) { continue } v.reset(OpARM64SLLconst) @@ -6044,7 +6048,7 @@ func rewriteValueARM64_OpARM64MNEGW(v *Value) bool { break } // match: (MNEGW x (MOVDconst [c])) - // cond: c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c) + // cond: c%5 == 0 && isPowerOfTwo64(c/5) && is32Bit(c) // result: (NEG (SLLconst <x.Type> [log2(c/5)] (ADDshiftLL <x.Type> x x [2]))) for { for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 { @@ -6053,7 +6057,7 @@ func rewriteValueARM64_OpARM64MNEGW(v *Value) bool { continue } c := auxIntToInt64(v_1.AuxInt) - if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) { + if !(c%5 == 0 && isPowerOfTwo64(c/5) && is32Bit(c)) { continue } v.reset(OpARM64NEG) @@ -6069,7 +6073,7 @@ func rewriteValueARM64_OpARM64MNEGW(v *Value) bool { break } // match: (MNEGW x (MOVDconst [c])) - // cond: c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c) + // cond: c%7 == 0 && isPowerOfTwo64(c/7) && is32Bit(c) // result: (SLLconst <x.Type> [log2(c/7)] (SUBshiftLL <x.Type> x x [3])) for { for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 { @@ -6078,7 +6082,7 @@ func rewriteValueARM64_OpARM64MNEGW(v *Value) bool { continue } c := auxIntToInt64(v_1.AuxInt) - if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) { + if !(c%7 == 0 && isPowerOfTwo64(c/7) && is32Bit(c)) { continue } v.reset(OpARM64SLLconst) @@ -6093,7 +6097,7 @@ func rewriteValueARM64_OpARM64MNEGW(v *Value) bool { break } // match: (MNEGW x (MOVDconst [c])) - // cond: c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c) + // cond: c%9 == 0 && isPowerOfTwo64(c/9) && is32Bit(c) // result: (NEG (SLLconst <x.Type> [log2(c/9)] (ADDshiftLL <x.Type> x x [3]))) for { for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 { @@ -6102,7 +6106,7 @@ func rewriteValueARM64_OpARM64MNEGW(v *Value) bool { continue } c := auxIntToInt64(v_1.AuxInt) - if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) { + if !(c%9 == 0 && isPowerOfTwo64(c/9) && is32Bit(c)) { continue } v.reset(OpARM64NEG) @@ -13376,7 +13380,7 @@ func rewriteValueARM64_OpARM64MSUB(v *Value) bool { return true } // match: (MSUB a x (MOVDconst [c])) - // cond: isPowerOfTwo(c) + // cond: isPowerOfTwo64(c) // result: (SUBshiftLL a x [log2(c)]) for { a := v_0 @@ -13385,7 +13389,7 @@ func rewriteValueARM64_OpARM64MSUB(v *Value) bool { break } c := auxIntToInt64(v_2.AuxInt) - if !(isPowerOfTwo(c)) { + if !(isPowerOfTwo64(c)) { break } v.reset(OpARM64SUBshiftLL) @@ -13394,7 +13398,7 @@ func rewriteValueARM64_OpARM64MSUB(v *Value) bool { return true } // match: (MSUB a x (MOVDconst [c])) - // cond: isPowerOfTwo(c-1) && c>=3 + // cond: isPowerOfTwo64(c-1) && c>=3 // result: (SUB a (ADDshiftLL <x.Type> x x [log2(c-1)])) for { a := v_0 @@ -13403,7 +13407,7 @@ func rewriteValueARM64_OpARM64MSUB(v *Value) bool { break } c := auxIntToInt64(v_2.AuxInt) - if !(isPowerOfTwo(c-1) && c >= 3) { + if !(isPowerOfTwo64(c-1) && c >= 3) { break } v.reset(OpARM64SUB) @@ -13414,7 +13418,7 @@ func rewriteValueARM64_OpARM64MSUB(v *Value) bool { return true } // match: (MSUB a x (MOVDconst [c])) - // cond: isPowerOfTwo(c+1) && c>=7 + // cond: isPowerOfTwo64(c+1) && c>=7 // result: (ADD a (SUBshiftLL <x.Type> x x [log2(c+1)])) for { a := v_0 @@ -13423,7 +13427,7 @@ func rewriteValueARM64_OpARM64MSUB(v *Value) bool { break } c := auxIntToInt64(v_2.AuxInt) - if !(isPowerOfTwo(c+1) && c >= 7) { + if !(isPowerOfTwo64(c+1) && c >= 7) { break } v.reset(OpARM64ADD) @@ -13434,7 +13438,7 @@ func rewriteValueARM64_OpARM64MSUB(v *Value) bool { return true } // match: (MSUB a x (MOVDconst [c])) - // cond: c%3 == 0 && isPowerOfTwo(c/3) + // cond: c%3 == 0 && isPowerOfTwo64(c/3) // result: (ADDshiftLL a (SUBshiftLL <x.Type> x x [2]) [log2(c/3)]) for { a := v_0 @@ -13443,7 +13447,7 @@ func rewriteValueARM64_OpARM64MSUB(v *Value) bool { break } c := auxIntToInt64(v_2.AuxInt) - if !(c%3 == 0 && isPowerOfTwo(c/3)) { + if !(c%3 == 0 && isPowerOfTwo64(c/3)) { break } v.reset(OpARM64ADDshiftLL) @@ -13455,7 +13459,7 @@ func rewriteValueARM64_OpARM64MSUB(v *Value) bool { return true } // match: (MSUB a x (MOVDconst [c])) - // cond: c%5 == 0 && isPowerOfTwo(c/5) + // cond: c%5 == 0 && isPowerOfTwo64(c/5) // result: (SUBshiftLL a (ADDshiftLL <x.Type> x x [2]) [log2(c/5)]) for { a := v_0 @@ -13464,7 +13468,7 @@ func rewriteValueARM64_OpARM64MSUB(v *Value) bool { break } c := auxIntToInt64(v_2.AuxInt) - if !(c%5 == 0 && isPowerOfTwo(c/5)) { + if !(c%5 == 0 && isPowerOfTwo64(c/5)) { break } v.reset(OpARM64SUBshiftLL) @@ -13476,7 +13480,7 @@ func rewriteValueARM64_OpARM64MSUB(v *Value) bool { return true } // match: (MSUB a x (MOVDconst [c])) - // cond: c%7 == 0 && isPowerOfTwo(c/7) + // cond: c%7 == 0 && isPowerOfTwo64(c/7) // result: (ADDshiftLL a (SUBshiftLL <x.Type> x x [3]) [log2(c/7)]) for { a := v_0 @@ -13485,7 +13489,7 @@ func rewriteValueARM64_OpARM64MSUB(v *Value) bool { break } c := auxIntToInt64(v_2.AuxInt) - if !(c%7 == 0 && isPowerOfTwo(c/7)) { + if !(c%7 == 0 && isPowerOfTwo64(c/7)) { break } v.reset(OpARM64ADDshiftLL) @@ -13497,7 +13501,7 @@ func rewriteValueARM64_OpARM64MSUB(v *Value) bool { return true } // match: (MSUB a x (MOVDconst [c])) - // cond: c%9 == 0 && isPowerOfTwo(c/9) + // cond: c%9 == 0 && isPowerOfTwo64(c/9) // result: (SUBshiftLL a (ADDshiftLL <x.Type> x x [3]) [log2(c/9)]) for { a := v_0 @@ -13506,7 +13510,7 @@ func rewriteValueARM64_OpARM64MSUB(v *Value) bool { break } c := auxIntToInt64(v_2.AuxInt) - if !(c%9 == 0 && isPowerOfTwo(c/9)) { + if !(c%9 == 0 && isPowerOfTwo64(c/9)) { break } v.reset(OpARM64SUBshiftLL) @@ -13552,7 +13556,7 @@ func rewriteValueARM64_OpARM64MSUB(v *Value) bool { return true } // match: (MSUB a (MOVDconst [c]) x) - // cond: isPowerOfTwo(c) + // cond: isPowerOfTwo64(c) // result: (SUBshiftLL a x [log2(c)]) for { a := v_0 @@ -13561,7 +13565,7 @@ func rewriteValueARM64_OpARM64MSUB(v *Value) bool { } c := auxIntToInt64(v_1.AuxInt) x := v_2 - if !(isPowerOfTwo(c)) { + if !(isPowerOfTwo64(c)) { break } v.reset(OpARM64SUBshiftLL) @@ -13570,7 +13574,7 @@ func rewriteValueARM64_OpARM64MSUB(v *Value) bool { return true } // match: (MSUB a (MOVDconst [c]) x) - // cond: isPowerOfTwo(c-1) && c>=3 + // cond: isPowerOfTwo64(c-1) && c>=3 // result: (SUB a (ADDshiftLL <x.Type> x x [log2(c-1)])) for { a := v_0 @@ -13579,7 +13583,7 @@ func rewriteValueARM64_OpARM64MSUB(v *Value) bool { } c := auxIntToInt64(v_1.AuxInt) x := v_2 - if !(isPowerOfTwo(c-1) && c >= 3) { + if !(isPowerOfTwo64(c-1) && c >= 3) { break } v.reset(OpARM64SUB) @@ -13590,7 +13594,7 @@ func rewriteValueARM64_OpARM64MSUB(v *Value) bool { return true } // match: (MSUB a (MOVDconst [c]) x) - // cond: isPowerOfTwo(c+1) && c>=7 + // cond: isPowerOfTwo64(c+1) && c>=7 // result: (ADD a (SUBshiftLL <x.Type> x x [log2(c+1)])) for { a := v_0 @@ -13599,7 +13603,7 @@ func rewriteValueARM64_OpARM64MSUB(v *Value) bool { } c := auxIntToInt64(v_1.AuxInt) x := v_2 - if !(isPowerOfTwo(c+1) && c >= 7) { + if !(isPowerOfTwo64(c+1) && c >= 7) { break } v.reset(OpARM64ADD) @@ -13610,7 +13614,7 @@ func rewriteValueARM64_OpARM64MSUB(v *Value) bool { return true } // match: (MSUB a (MOVDconst [c]) x) - // cond: c%3 == 0 && isPowerOfTwo(c/3) + // cond: c%3 == 0 && isPowerOfTwo64(c/3) // result: (ADDshiftLL a (SUBshiftLL <x.Type> x x [2]) [log2(c/3)]) for { a := v_0 @@ -13619,7 +13623,7 @@ func rewriteValueARM64_OpARM64MSUB(v *Value) bool { } c := auxIntToInt64(v_1.AuxInt) x := v_2 - if !(c%3 == 0 && isPowerOfTwo(c/3)) { + if !(c%3 == 0 && isPowerOfTwo64(c/3)) { break } v.reset(OpARM64ADDshiftLL) @@ -13631,7 +13635,7 @@ func rewriteValueARM64_OpARM64MSUB(v *Value) bool { return true } // match: (MSUB a (MOVDconst [c]) x) - // cond: c%5 == 0 && isPowerOfTwo(c/5) + // cond: c%5 == 0 && isPowerOfTwo64(c/5) // result: (SUBshiftLL a (ADDshiftLL <x.Type> x x [2]) [log2(c/5)]) for { a := v_0 @@ -13640,7 +13644,7 @@ func rewriteValueARM64_OpARM64MSUB(v *Value) bool { } c := auxIntToInt64(v_1.AuxInt) x := v_2 - if !(c%5 == 0 && isPowerOfTwo(c/5)) { + if !(c%5 == 0 && isPowerOfTwo64(c/5)) { break } v.reset(OpARM64SUBshiftLL) @@ -13652,7 +13656,7 @@ func rewriteValueARM64_OpARM64MSUB(v *Value) bool { return true } // match: (MSUB a (MOVDconst [c]) x) - // cond: c%7 == 0 && isPowerOfTwo(c/7) + // cond: c%7 == 0 && isPowerOfTwo64(c/7) // result: (ADDshiftLL a (SUBshiftLL <x.Type> x x [3]) [log2(c/7)]) for { a := v_0 @@ -13661,7 +13665,7 @@ func rewriteValueARM64_OpARM64MSUB(v *Value) bool { } c := auxIntToInt64(v_1.AuxInt) x := v_2 - if !(c%7 == 0 && isPowerOfTwo(c/7)) { + if !(c%7 == 0 && isPowerOfTwo64(c/7)) { break } v.reset(OpARM64ADDshiftLL) @@ -13673,7 +13677,7 @@ func rewriteValueARM64_OpARM64MSUB(v *Value) bool { return true } // match: (MSUB a (MOVDconst [c]) x) - // cond: c%9 == 0 && isPowerOfTwo(c/9) + // cond: c%9 == 0 && isPowerOfTwo64(c/9) // result: (SUBshiftLL a (ADDshiftLL <x.Type> x x [3]) [log2(c/9)]) for { a := v_0 @@ -13682,7 +13686,7 @@ func rewriteValueARM64_OpARM64MSUB(v *Value) bool { } c := auxIntToInt64(v_1.AuxInt) x := v_2 - if !(c%9 == 0 && isPowerOfTwo(c/9)) { + if !(c%9 == 0 && isPowerOfTwo64(c/9)) { break } v.reset(OpARM64SUBshiftLL) @@ -13783,7 +13787,7 @@ func rewriteValueARM64_OpARM64MSUBW(v *Value) bool { return true } // match: (MSUBW a x (MOVDconst [c])) - // cond: isPowerOfTwo(c) + // cond: isPowerOfTwo64(c) // result: (SUBshiftLL a x [log2(c)]) for { a := v_0 @@ -13792,7 +13796,7 @@ func rewriteValueARM64_OpARM64MSUBW(v *Value) bool { break } c := auxIntToInt64(v_2.AuxInt) - if !(isPowerOfTwo(c)) { + if !(isPowerOfTwo64(c)) { break } v.reset(OpARM64SUBshiftLL) @@ -13801,7 +13805,7 @@ func rewriteValueARM64_OpARM64MSUBW(v *Value) bool { return true } // match: (MSUBW a x (MOVDconst [c])) - // cond: isPowerOfTwo(c-1) && int32(c)>=3 + // cond: isPowerOfTwo64(c-1) && int32(c)>=3 // result: (SUB a (ADDshiftLL <x.Type> x x [log2(c-1)])) for { a := v_0 @@ -13810,7 +13814,7 @@ func rewriteValueARM64_OpARM64MSUBW(v *Value) bool { break } c := auxIntToInt64(v_2.AuxInt) - if !(isPowerOfTwo(c-1) && int32(c) >= 3) { + if !(isPowerOfTwo64(c-1) && int32(c) >= 3) { break } v.reset(OpARM64SUB) @@ -13821,7 +13825,7 @@ func rewriteValueARM64_OpARM64MSUBW(v *Value) bool { return true } // match: (MSUBW a x (MOVDconst [c])) - // cond: isPowerOfTwo(c+1) && int32(c)>=7 + // cond: isPowerOfTwo64(c+1) && int32(c)>=7 // result: (ADD a (SUBshiftLL <x.Type> x x [log2(c+1)])) for { a := v_0 @@ -13830,7 +13834,7 @@ func rewriteValueARM64_OpARM64MSUBW(v *Value) bool { break } c := auxIntToInt64(v_2.AuxInt) - if !(isPowerOfTwo(c+1) && int32(c) >= 7) { + if !(isPowerOfTwo64(c+1) && int32(c) >= 7) { break } v.reset(OpARM64ADD) @@ -13841,7 +13845,7 @@ func rewriteValueARM64_OpARM64MSUBW(v *Value) bool { return true } // match: (MSUBW a x (MOVDconst [c])) - // cond: c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c) + // cond: c%3 == 0 && isPowerOfTwo64(c/3) && is32Bit(c) // result: (ADDshiftLL a (SUBshiftLL <x.Type> x x [2]) [log2(c/3)]) for { a := v_0 @@ -13850,7 +13854,7 @@ func rewriteValueARM64_OpARM64MSUBW(v *Value) bool { break } c := auxIntToInt64(v_2.AuxInt) - if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) { + if !(c%3 == 0 && isPowerOfTwo64(c/3) && is32Bit(c)) { break } v.reset(OpARM64ADDshiftLL) @@ -13862,7 +13866,7 @@ func rewriteValueARM64_OpARM64MSUBW(v *Value) bool { return true } // match: (MSUBW a x (MOVDconst [c])) - // cond: c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c) + // cond: c%5 == 0 && isPowerOfTwo64(c/5) && is32Bit(c) // result: (SUBshiftLL a (ADDshiftLL <x.Type> x x [2]) [log2(c/5)]) for { a := v_0 @@ -13871,7 +13875,7 @@ func rewriteValueARM64_OpARM64MSUBW(v *Value) bool { break } c := auxIntToInt64(v_2.AuxInt) - if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) { + if !(c%5 == 0 && isPowerOfTwo64(c/5) && is32Bit(c)) { break } v.reset(OpARM64SUBshiftLL) @@ -13883,7 +13887,7 @@ func rewriteValueARM64_OpARM64MSUBW(v *Value) bool { return true } // match: (MSUBW a x (MOVDconst [c])) - // cond: c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c) + // cond: c%7 == 0 && isPowerOfTwo64(c/7) && is32Bit(c) // result: (ADDshiftLL a (SUBshiftLL <x.Type> x x [3]) [log2(c/7)]) for { a := v_0 @@ -13892,7 +13896,7 @@ func rewriteValueARM64_OpARM64MSUBW(v *Value) bool { break } c := auxIntToInt64(v_2.AuxInt) - if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) { + if !(c%7 == 0 && isPowerOfTwo64(c/7) && is32Bit(c)) { break } v.reset(OpARM64ADDshiftLL) @@ -13904,7 +13908,7 @@ func rewriteValueARM64_OpARM64MSUBW(v *Value) bool { return true } // match: (MSUBW a x (MOVDconst [c])) - // cond: c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c) + // cond: c%9 == 0 && isPowerOfTwo64(c/9) && is32Bit(c) // result: (SUBshiftLL a (ADDshiftLL <x.Type> x x [3]) [log2(c/9)]) for { a := v_0 @@ -13913,7 +13917,7 @@ func rewriteValueARM64_OpARM64MSUBW(v *Value) bool { break } c := auxIntToInt64(v_2.AuxInt) - if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) { + if !(c%9 == 0 && isPowerOfTwo64(c/9) && is32Bit(c)) { break } v.reset(OpARM64SUBshiftLL) @@ -13974,7 +13978,7 @@ func rewriteValueARM64_OpARM64MSUBW(v *Value) bool { return true } // match: (MSUBW a (MOVDconst [c]) x) - // cond: isPowerOfTwo(c) + // cond: isPowerOfTwo64(c) // result: (SUBshiftLL a x [log2(c)]) for { a := v_0 @@ -13983,7 +13987,7 @@ func rewriteValueARM64_OpARM64MSUBW(v *Value) bool { } c := auxIntToInt64(v_1.AuxInt) x := v_2 - if !(isPowerOfTwo(c)) { + if !(isPowerOfTwo64(c)) { break } v.reset(OpARM64SUBshiftLL) @@ -13992,7 +13996,7 @@ func rewriteValueARM64_OpARM64MSUBW(v *Value) bool { return true } // match: (MSUBW a (MOVDconst [c]) x) - // cond: isPowerOfTwo(c-1) && int32(c)>=3 + // cond: isPowerOfTwo64(c-1) && int32(c)>=3 // result: (SUB a (ADDshiftLL <x.Type> x x [log2(c-1)])) for { a := v_0 @@ -14001,7 +14005,7 @@ func rewriteValueARM64_OpARM64MSUBW(v *Value) bool { } c := auxIntToInt64(v_1.AuxInt) x := v_2 - if !(isPowerOfTwo(c-1) && int32(c) >= 3) { + if !(isPowerOfTwo64(c-1) && int32(c) >= 3) { break } v.reset(OpARM64SUB) @@ -14012,7 +14016,7 @@ func rewriteValueARM64_OpARM64MSUBW(v *Value) bool { return true } // match: (MSUBW a (MOVDconst [c]) x) - // cond: isPowerOfTwo(c+1) && int32(c)>=7 + // cond: isPowerOfTwo64(c+1) && int32(c)>=7 // result: (ADD a (SUBshiftLL <x.Type> x x [log2(c+1)])) for { a := v_0 @@ -14021,7 +14025,7 @@ func rewriteValueARM64_OpARM64MSUBW(v *Value) bool { } c := auxIntToInt64(v_1.AuxInt) x := v_2 - if !(isPowerOfTwo(c+1) && int32(c) >= 7) { + if !(isPowerOfTwo64(c+1) && int32(c) >= 7) { break } v.reset(OpARM64ADD) @@ -14032,7 +14036,7 @@ func rewriteValueARM64_OpARM64MSUBW(v *Value) bool { return true } // match: (MSUBW a (MOVDconst [c]) x) - // cond: c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c) + // cond: c%3 == 0 && isPowerOfTwo64(c/3) && is32Bit(c) // result: (ADDshiftLL a (SUBshiftLL <x.Type> x x [2]) [log2(c/3)]) for { a := v_0 @@ -14041,7 +14045,7 @@ func rewriteValueARM64_OpARM64MSUBW(v *Value) bool { } c := auxIntToInt64(v_1.AuxInt) x := v_2 - if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) { + if !(c%3 == 0 && isPowerOfTwo64(c/3) && is32Bit(c)) { break } v.reset(OpARM64ADDshiftLL) @@ -14053,7 +14057,7 @@ func rewriteValueARM64_OpARM64MSUBW(v *Value) bool { return true } // match: (MSUBW a (MOVDconst [c]) x) - // cond: c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c) + // cond: c%5 == 0 && isPowerOfTwo64(c/5) && is32Bit(c) // result: (SUBshiftLL a (ADDshiftLL <x.Type> x x [2]) [log2(c/5)]) for { a := v_0 @@ -14062,7 +14066,7 @@ func rewriteValueARM64_OpARM64MSUBW(v *Value) bool { } c := auxIntToInt64(v_1.AuxInt) x := v_2 - if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) { + if !(c%5 == 0 && isPowerOfTwo64(c/5) && is32Bit(c)) { break } v.reset(OpARM64SUBshiftLL) @@ -14074,7 +14078,7 @@ func rewriteValueARM64_OpARM64MSUBW(v *Value) bool { return true } // match: (MSUBW a (MOVDconst [c]) x) - // cond: c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c) + // cond: c%7 == 0 && isPowerOfTwo64(c/7) && is32Bit(c) // result: (ADDshiftLL a (SUBshiftLL <x.Type> x x [3]) [log2(c/7)]) for { a := v_0 @@ -14083,7 +14087,7 @@ func rewriteValueARM64_OpARM64MSUBW(v *Value) bool { } c := auxIntToInt64(v_1.AuxInt) x := v_2 - if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) { + if !(c%7 == 0 && isPowerOfTwo64(c/7) && is32Bit(c)) { break } v.reset(OpARM64ADDshiftLL) @@ -14095,7 +14099,7 @@ func rewriteValueARM64_OpARM64MSUBW(v *Value) bool { return true } // match: (MSUBW a (MOVDconst [c]) x) - // cond: c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c) + // cond: c%9 == 0 && isPowerOfTwo64(c/9) && is32Bit(c) // result: (SUBshiftLL a (ADDshiftLL <x.Type> x x [3]) [log2(c/9)]) for { a := v_0 @@ -14104,7 +14108,7 @@ func rewriteValueARM64_OpARM64MSUBW(v *Value) bool { } c := auxIntToInt64(v_1.AuxInt) x := v_2 - if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) { + if !(c%9 == 0 && isPowerOfTwo64(c/9) && is32Bit(c)) { break } v.reset(OpARM64SUBshiftLL) @@ -14210,7 +14214,7 @@ func rewriteValueARM64_OpARM64MUL(v *Value) bool { break } // match: (MUL x (MOVDconst [c])) - // cond: isPowerOfTwo(c) + // cond: isPowerOfTwo64(c) // result: (SLLconst [log2(c)] x) for { for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 { @@ -14219,7 +14223,7 @@ func rewriteValueARM64_OpARM64MUL(v *Value) bool { continue } c := auxIntToInt64(v_1.AuxInt) - if !(isPowerOfTwo(c)) { + if !(isPowerOfTwo64(c)) { continue } v.reset(OpARM64SLLconst) @@ -14230,7 +14234,7 @@ func rewriteValueARM64_OpARM64MUL(v *Value) bool { break } // match: (MUL x (MOVDconst [c])) - // cond: isPowerOfTwo(c-1) && c >= 3 + // cond: isPowerOfTwo64(c-1) && c >= 3 // result: (ADDshiftLL x x [log2(c-1)]) for { for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 { @@ -14239,7 +14243,7 @@ func rewriteValueARM64_OpARM64MUL(v *Value) bool { continue } c := auxIntToInt64(v_1.AuxInt) - if !(isPowerOfTwo(c-1) && c >= 3) { + if !(isPowerOfTwo64(c-1) && c >= 3) { continue } v.reset(OpARM64ADDshiftLL) @@ -14250,7 +14254,7 @@ func rewriteValueARM64_OpARM64MUL(v *Value) bool { break } // match: (MUL x (MOVDconst [c])) - // cond: isPowerOfTwo(c+1) && c >= 7 + // cond: isPowerOfTwo64(c+1) && c >= 7 // result: (ADDshiftLL (NEG <x.Type> x) x [log2(c+1)]) for { for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 { @@ -14259,7 +14263,7 @@ func rewriteValueARM64_OpARM64MUL(v *Value) bool { continue } c := auxIntToInt64(v_1.AuxInt) - if !(isPowerOfTwo(c+1) && c >= 7) { + if !(isPowerOfTwo64(c+1) && c >= 7) { continue } v.reset(OpARM64ADDshiftLL) @@ -14272,7 +14276,7 @@ func rewriteValueARM64_OpARM64MUL(v *Value) bool { break } // match: (MUL x (MOVDconst [c])) - // cond: c%3 == 0 && isPowerOfTwo(c/3) + // cond: c%3 == 0 && isPowerOfTwo64(c/3) // result: (SLLconst [log2(c/3)] (ADDshiftLL <x.Type> x x [1])) for { for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 { @@ -14281,7 +14285,7 @@ func rewriteValueARM64_OpARM64MUL(v *Value) bool { continue } c := auxIntToInt64(v_1.AuxInt) - if !(c%3 == 0 && isPowerOfTwo(c/3)) { + if !(c%3 == 0 && isPowerOfTwo64(c/3)) { continue } v.reset(OpARM64SLLconst) @@ -14295,7 +14299,7 @@ func rewriteValueARM64_OpARM64MUL(v *Value) bool { break } // match: (MUL x (MOVDconst [c])) - // cond: c%5 == 0 && isPowerOfTwo(c/5) + // cond: c%5 == 0 && isPowerOfTwo64(c/5) // result: (SLLconst [log2(c/5)] (ADDshiftLL <x.Type> x x [2])) for { for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 { @@ -14304,7 +14308,7 @@ func rewriteValueARM64_OpARM64MUL(v *Value) bool { continue } c := auxIntToInt64(v_1.AuxInt) - if !(c%5 == 0 && isPowerOfTwo(c/5)) { + if !(c%5 == 0 && isPowerOfTwo64(c/5)) { continue } v.reset(OpARM64SLLconst) @@ -14318,7 +14322,7 @@ func rewriteValueARM64_OpARM64MUL(v *Value) bool { break } // match: (MUL x (MOVDconst [c])) - // cond: c%7 == 0 && isPowerOfTwo(c/7) + // cond: c%7 == 0 && isPowerOfTwo64(c/7) // result: (SLLconst [log2(c/7)] (ADDshiftLL <x.Type> (NEG <x.Type> x) x [3])) for { for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 { @@ -14327,7 +14331,7 @@ func rewriteValueARM64_OpARM64MUL(v *Value) bool { continue } c := auxIntToInt64(v_1.AuxInt) - if !(c%7 == 0 && isPowerOfTwo(c/7)) { + if !(c%7 == 0 && isPowerOfTwo64(c/7)) { continue } v.reset(OpARM64SLLconst) @@ -14343,7 +14347,7 @@ func rewriteValueARM64_OpARM64MUL(v *Value) bool { break } // match: (MUL x (MOVDconst [c])) - // cond: c%9 == 0 && isPowerOfTwo(c/9) + // cond: c%9 == 0 && isPowerOfTwo64(c/9) // result: (SLLconst [log2(c/9)] (ADDshiftLL <x.Type> x x [3])) for { for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 { @@ -14352,7 +14356,7 @@ func rewriteValueARM64_OpARM64MUL(v *Value) bool { continue } c := auxIntToInt64(v_1.AuxInt) - if !(c%9 == 0 && isPowerOfTwo(c/9)) { + if !(c%9 == 0 && isPowerOfTwo64(c/9)) { continue } v.reset(OpARM64SLLconst) @@ -14460,7 +14464,7 @@ func rewriteValueARM64_OpARM64MULW(v *Value) bool { break } // match: (MULW x (MOVDconst [c])) - // cond: isPowerOfTwo(c) + // cond: isPowerOfTwo64(c) // result: (SLLconst [log2(c)] x) for { for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 { @@ -14469,7 +14473,7 @@ func rewriteValueARM64_OpARM64MULW(v *Value) bool { continue } c := auxIntToInt64(v_1.AuxInt) - if !(isPowerOfTwo(c)) { + if !(isPowerOfTwo64(c)) { continue } v.reset(OpARM64SLLconst) @@ -14480,7 +14484,7 @@ func rewriteValueARM64_OpARM64MULW(v *Value) bool { break } // match: (MULW x (MOVDconst [c])) - // cond: isPowerOfTwo(c-1) && int32(c) >= 3 + // cond: isPowerOfTwo64(c-1) && int32(c) >= 3 // result: (ADDshiftLL x x [log2(c-1)]) for { for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 { @@ -14489,7 +14493,7 @@ func rewriteValueARM64_OpARM64MULW(v *Value) bool { continue } c := auxIntToInt64(v_1.AuxInt) - if !(isPowerOfTwo(c-1) && int32(c) >= 3) { + if !(isPowerOfTwo64(c-1) && int32(c) >= 3) { continue } v.reset(OpARM64ADDshiftLL) @@ -14500,7 +14504,7 @@ func rewriteValueARM64_OpARM64MULW(v *Value) bool { break } // match: (MULW x (MOVDconst [c])) - // cond: isPowerOfTwo(c+1) && int32(c) >= 7 + // cond: isPowerOfTwo64(c+1) && int32(c) >= 7 // result: (ADDshiftLL (NEG <x.Type> x) x [log2(c+1)]) for { for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 { @@ -14509,7 +14513,7 @@ func rewriteValueARM64_OpARM64MULW(v *Value) bool { continue } c := auxIntToInt64(v_1.AuxInt) - if !(isPowerOfTwo(c+1) && int32(c) >= 7) { + if !(isPowerOfTwo64(c+1) && int32(c) >= 7) { continue } v.reset(OpARM64ADDshiftLL) @@ -14522,7 +14526,7 @@ func rewriteValueARM64_OpARM64MULW(v *Value) bool { break } // match: (MULW x (MOVDconst [c])) - // cond: c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c) + // cond: c%3 == 0 && isPowerOfTwo64(c/3) && is32Bit(c) // result: (SLLconst [log2(c/3)] (ADDshiftLL <x.Type> x x [1])) for { for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 { @@ -14531,7 +14535,7 @@ func rewriteValueARM64_OpARM64MULW(v *Value) bool { continue } c := auxIntToInt64(v_1.AuxInt) - if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) { + if !(c%3 == 0 && isPowerOfTwo64(c/3) && is32Bit(c)) { continue } v.reset(OpARM64SLLconst) @@ -14545,7 +14549,7 @@ func rewriteValueARM64_OpARM64MULW(v *Value) bool { break } // match: (MULW x (MOVDconst [c])) - // cond: c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c) + // cond: c%5 == 0 && isPowerOfTwo64(c/5) && is32Bit(c) // result: (SLLconst [log2(c/5)] (ADDshiftLL <x.Type> x x [2])) for { for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 { @@ -14554,7 +14558,7 @@ func rewriteValueARM64_OpARM64MULW(v *Value) bool { continue } c := auxIntToInt64(v_1.AuxInt) - if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) { + if !(c%5 == 0 && isPowerOfTwo64(c/5) && is32Bit(c)) { continue } v.reset(OpARM64SLLconst) @@ -14568,7 +14572,7 @@ func rewriteValueARM64_OpARM64MULW(v *Value) bool { break } // match: (MULW x (MOVDconst [c])) - // cond: c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c) + // cond: c%7 == 0 && isPowerOfTwo64(c/7) && is32Bit(c) // result: (SLLconst [log2(c/7)] (ADDshiftLL <x.Type> (NEG <x.Type> x) x [3])) for { for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 { @@ -14577,7 +14581,7 @@ func rewriteValueARM64_OpARM64MULW(v *Value) bool { continue } c := auxIntToInt64(v_1.AuxInt) - if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) { + if !(c%7 == 0 && isPowerOfTwo64(c/7) && is32Bit(c)) { continue } v.reset(OpARM64SLLconst) @@ -14593,7 +14597,7 @@ func rewriteValueARM64_OpARM64MULW(v *Value) bool { break } // match: (MULW x (MOVDconst [c])) - // cond: c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c) + // cond: c%9 == 0 && isPowerOfTwo64(c/9) && is32Bit(c) // result: (SLLconst [log2(c/9)] (ADDshiftLL <x.Type> x x [3])) for { for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 { @@ -14602,7 +14606,7 @@ func rewriteValueARM64_OpARM64MULW(v *Value) bool { continue } c := auxIntToInt64(v_1.AuxInt) - if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) { + if !(c%9 == 0 && isPowerOfTwo64(c/9) && is32Bit(c)) { continue } v.reset(OpARM64SLLconst) @@ -20382,7 +20386,7 @@ func rewriteValueARM64_OpARM64UDIV(v *Value) bool { return true } // match: (UDIV x (MOVDconst [c])) - // cond: isPowerOfTwo(c) + // cond: isPowerOfTwo64(c) // result: (SRLconst [log2(c)] x) for { x := v_0 @@ -20390,7 +20394,7 @@ func rewriteValueARM64_OpARM64UDIV(v *Value) bool { break } c := auxIntToInt64(v_1.AuxInt) - if !(isPowerOfTwo(c)) { + if !(isPowerOfTwo64(c)) { break } v.reset(OpARM64SRLconst) @@ -20434,7 +20438,7 @@ func rewriteValueARM64_OpARM64UDIVW(v *Value) bool { return true } // match: (UDIVW x (MOVDconst [c])) - // cond: isPowerOfTwo(c) && is32Bit(c) + // cond: isPowerOfTwo64(c) && is32Bit(c) // result: (SRLconst [log2(c)] x) for { x := v_0 @@ -20442,7 +20446,7 @@ func rewriteValueARM64_OpARM64UDIVW(v *Value) bool { break } c := auxIntToInt64(v_1.AuxInt) - if !(isPowerOfTwo(c) && is32Bit(c)) { + if !(isPowerOfTwo64(c) && is32Bit(c)) { break } v.reset(OpARM64SRLconst) @@ -20498,7 +20502,7 @@ func rewriteValueARM64_OpARM64UMOD(v *Value) bool { return true } // match: (UMOD x (MOVDconst [c])) - // cond: isPowerOfTwo(c) + // cond: isPowerOfTwo64(c) // result: (ANDconst [c-1] x) for { x := v_0 @@ -20506,7 +20510,7 @@ func rewriteValueARM64_OpARM64UMOD(v *Value) bool { break } c := auxIntToInt64(v_1.AuxInt) - if !(isPowerOfTwo(c)) { + if !(isPowerOfTwo64(c)) { break } v.reset(OpARM64ANDconst) @@ -20567,7 +20571,7 @@ func rewriteValueARM64_OpARM64UMODW(v *Value) bool { return true } // match: (UMODW x (MOVDconst [c])) - // cond: isPowerOfTwo(c) && is32Bit(c) + // cond: isPowerOfTwo64(c) && is32Bit(c) // result: (ANDconst [c-1] x) for { x := v_0 @@ -20575,7 +20579,7 @@ func rewriteValueARM64_OpARM64UMODW(v *Value) bool { break } c := auxIntToInt64(v_1.AuxInt) - if !(isPowerOfTwo(c) && is32Bit(c)) { + if !(isPowerOfTwo64(c) && is32Bit(c)) { break } v.reset(OpARM64ANDconst) @@ -21340,6 +21344,25 @@ func rewriteValueARM64_OpAddr(v *Value) bool { return true } } +func rewriteValueARM64_OpAtomicAnd32(v *Value) bool { + v_2 := v.Args[2] + v_1 := v.Args[1] + v_0 := v.Args[0] + b := v.Block + typ := &b.Func.Config.Types + // match: (AtomicAnd32 ptr val mem) + // result: (Select1 (LoweredAtomicAnd32 ptr val mem)) + for { + ptr := v_0 + val := v_1 + mem := v_2 + v.reset(OpSelect1) + v0 := b.NewValue0(v.Pos, OpARM64LoweredAtomicAnd32, types.NewTuple(typ.UInt32, types.TypeMem)) + v0.AddArg3(ptr, val, mem) + v.AddArg(v0) + return true + } +} func rewriteValueARM64_OpAtomicAnd8(v *Value) bool { v_2 := v.Args[2] v_1 := v.Args[1] @@ -21359,6 +21382,25 @@ func rewriteValueARM64_OpAtomicAnd8(v *Value) bool { return true } } +func rewriteValueARM64_OpAtomicOr32(v *Value) bool { + v_2 := v.Args[2] + v_1 := v.Args[1] + v_0 := v.Args[0] + b := v.Block + typ := &b.Func.Config.Types + // match: (AtomicOr32 ptr val mem) + // result: (Select1 (LoweredAtomicOr32 ptr val mem)) + for { + ptr := v_0 + val := v_1 + mem := v_2 + v.reset(OpSelect1) + v0 := b.NewValue0(v.Pos, OpARM64LoweredAtomicOr32, types.NewTuple(typ.UInt32, types.TypeMem)) + v0.AddArg3(ptr, val, mem) + v.AddArg(v0) + return true + } +} func rewriteValueARM64_OpAtomicOr8(v *Value) bool { v_2 := v.Args[2] v_1 := v.Args[1] |