- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for isPowerOfTwo64 (0.63 sec)
-
src/cmd/compile/internal/ssa/_gen/ARM64.rules
(MUL x (MOVDconst [1])) => x (MUL x (MOVDconst [c])) && isPowerOfTwo64(c) => (SLLconst [log64(c)] x) (MUL x (MOVDconst [c])) && isPowerOfTwo64(c-1) && c >= 3 => (ADDshiftLL x x [log64(c-1)]) (MUL x (MOVDconst [c])) && isPowerOfTwo64(c+1) && c >= 7 => (ADDshiftLL (NEG <x.Type> x) x [log64(c+1)]) (MUL x (MOVDconst [c])) && c%3 == 0 && isPowerOfTwo64(c/3) => (SLLconst [log64(c/3)] (ADDshiftLL <x.Type> x x [1]))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 15:49:20 UTC 2024 - 113.1K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/rewriteARM64.go
v.AddArg2(a, x) return true } // match: (MADD a x (MOVDconst [c])) // cond: isPowerOfTwo64(c) // result: (ADDshiftLL a x [log64(c)]) for { a := v_0 x := v_1 if v_2.Op != OpARM64MOVDconst { break } c := auxIntToInt64(v_2.AuxInt) if !(isPowerOfTwo64(c)) { break } v.reset(OpARM64ADDshiftLL) v.AuxInt = int64ToAuxInt(log64(c))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 15:49:20 UTC 2024 - 608.6K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/_gen/generic.rules
(Mul16 <t> n (Const16 [c])) && isPowerOfTwo16(c) => (Lsh16x64 <t> n (Const64 <typ.UInt64> [log16(c)])) (Mul32 <t> n (Const32 [c])) && isPowerOfTwo32(c) => (Lsh32x64 <t> n (Const64 <typ.UInt64> [log32(c)])) (Mul64 <t> n (Const64 [c])) && isPowerOfTwo64(c) => (Lsh64x64 <t> n (Const64 <typ.UInt64> [log64(c)])) (Mul8 <t> n (Const8 [c])) && t.IsSigned() && isPowerOfTwo8(-c) => (Neg8 (Lsh8x64 <t> n (Const64 <typ.UInt64> [log8(-c)])))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 16 22:21:05 UTC 2024 - 135.3K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/rewrite.go
return n > 0 && n&(n-1) == 0 } func isPowerOfTwo16(n int16) bool { return n > 0 && n&(n-1) == 0 } func isPowerOfTwo32(n int32) bool { return n > 0 && n&(n-1) == 0 } func isPowerOfTwo64(n int64) bool { return n > 0 && n&(n-1) == 0 } // isUint64PowerOfTwo reports whether uint64(n) is a power of 2. func isUint64PowerOfTwo(in int64) bool { n := uint64(in) return n > 0 && n&(n-1) == 0
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jun 07 19:02:52 UTC 2024 - 64.2K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/rewritegeneric.go
return true } // match: (Div64 n (Const64 [c])) // cond: isNonNegative(n) && isPowerOfTwo64(c) // result: (Rsh64Ux64 n (Const64 <typ.UInt64> [log64(c)])) for { n := v_0 if v_1.Op != OpConst64 { break } c := auxIntToInt64(v_1.AuxInt) if !(isNonNegative(n) && isPowerOfTwo64(c)) { break } v.reset(OpRsh64Ux64) v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 22 18:24:47 UTC 2024 - 812.2K bytes - Viewed (0)