- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 11 for isPowerOfTwo64 (0.78 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/LOONG64.rules
(MULV x (MOVVconst [1])) => x (MULV x (MOVVconst [c])) && isPowerOfTwo64(c) => (SLLVconst [log64(c)] x) // div by constant (DIVVU x (MOVVconst [1])) => x (DIVVU x (MOVVconst [c])) && isPowerOfTwo64(c) => (SRLVconst [log64(c)] x) (REMVU _ (MOVVconst [1])) => (MOVVconst [0]) // mod (REMVU x (MOVVconst [c])) && isPowerOfTwo64(c) => (ANDconst [c-1] x) // mod // generic simplifications
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Nov 21 19:26:25 UTC 2023 - 31.8K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/_gen/MIPS64.rules
(Select1 (MULVU x (MOVVconst [c]))) && isPowerOfTwo64(c) => (SLLVconst [log64(c)] x) // div by constant (Select1 (DIVVU x (MOVVconst [1]))) => x (Select1 (DIVVU x (MOVVconst [c]))) && isPowerOfTwo64(c) => (SRLVconst [log64(c)] x) (Select0 (DIVVU _ (MOVVconst [1]))) => (MOVVconst [0]) // mod (Select0 (DIVVU x (MOVVconst [c]))) && isPowerOfTwo64(c) => (ANDconst [c-1] x) // mod // generic simplifications
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jul 31 03:59:48 UTC 2023 - 41.9K 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/rewriteLOONG64.go
break } v.copyOf(x) return true } // match: (DIVVU x (MOVVconst [c])) // cond: isPowerOfTwo64(c) // result: (SRLVconst [log64(c)] x) for { x := v_0 if v_1.Op != OpLOONG64MOVVconst { break } c := auxIntToInt64(v_1.AuxInt) if !(isPowerOfTwo64(c)) { break } v.reset(OpLOONG64SRLVconst) v.AuxInt = int64ToAuxInt(log64(c)) v.AddArg(x)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Nov 21 19:26:25 UTC 2023 - 195.8K 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/rewriteMIPS64.go
} // match: (Select0 (DIVVU x (MOVVconst [c]))) // cond: isPowerOfTwo64(c) // result: (ANDconst [c-1] x) for { if v_0.Op != OpMIPS64DIVVU { break } _ = v_0.Args[1] x := v_0.Args[0] v_0_1 := v_0.Args[1] if v_0_1.Op != OpMIPS64MOVVconst { break } c := auxIntToInt64(v_0_1.AuxInt) if !(isPowerOfTwo64(c)) { break } v.reset(OpMIPS64ANDconst)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jul 31 03:59:48 UTC 2023 - 211.6K 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) -
src/cmd/compile/internal/ssa/_gen/AMD64.rules
(MUL(Q|L)const [73] x) => (LEA(Q|L)8 x (LEA(Q|L)8 <v.Type> x x)) (MUL(Q|L)const [81] x) => (LEA(Q|L)8 (LEA(Q|L)8 <v.Type> x x) (LEA(Q|L)8 <v.Type> x x)) (MUL(Q|L)const [c] x) && isPowerOfTwo64(int64(c)+1) && c >= 15 => (SUB(Q|L) (SHL(Q|L)const <v.Type> [int8(log64(int64(c)+1))] x) x) (MUL(Q|L)const [c] x) && isPowerOfTwo32(c-1) && c >= 17 => (LEA(Q|L)1 (SHL(Q|L)const <v.Type> [int8(log32(c-1))] x) x)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 12 19:38:41 UTC 2024 - 93.9K bytes - Viewed (0)