- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for umagicOK8 (0.12 sec)
-
src/cmd/compile/internal/ssa/magic.go
// Don't use for powers of 2. return d&(d-1) != 0 } // umagicOKn reports whether we should strength reduce an unsigned n-bit divide by c. // We can strength reduce when c != 0 and c is not a power of two. func umagicOK8(c int8) bool { return c&(c-1) != 0 } func umagicOK16(c int16) bool { return c&(c-1) != 0 } func umagicOK32(c int32) bool { return c&(c-1) != 0 } func umagicOK64(c int64) bool { return c&(c-1) != 0 }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 26 19:58:25 UTC 2024 - 15.8K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/_gen/generic.rules
// For 8-bit divides, we just do a direct 9-bit by 8-bit multiply. (Div8u x (Const8 [c])) && umagicOK8(c) => (Trunc32to8 (Rsh32Ux64 <typ.UInt32> (Mul32 <typ.UInt32> (Const32 <typ.UInt32> [int32(1<<8+umagic8(c).m)]) (ZeroExt8to32 x)) (Const64 <typ.UInt64> [8+umagic8(c).s]))) // For 16-bit divides on 64-bit machines, we do a direct 17-bit by 16-bit multiply.
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/rewritegeneric.go
} // match: (Div8u x (Const8 [c])) // cond: umagicOK8(c) // result: (Trunc32to8 (Rsh32Ux64 <typ.UInt32> (Mul32 <typ.UInt32> (Const32 <typ.UInt32> [int32(1<<8+umagic8(c).m)]) (ZeroExt8to32 x)) (Const64 <typ.UInt64> [8+umagic8(c).s]))) for { x := v_0 if v_1.Op != OpConst8 { break } c := auxIntToInt8(v_1.AuxInt) if !(umagicOK8(c)) { break } v.reset(OpTrunc32to8)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 22 18:24:47 UTC 2024 - 812.2K bytes - Viewed (0)