- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for smagicOK8 (0.22 sec)
-
src/cmd/compile/internal/ssa/magic.go
return false } // Doesn't work for 0. // Don't use it for powers of 2. return c&(c-1) != 0 } // smagicOKn reports whether we should strength reduce a signed n-bit divide by c. func smagicOK8(c int8) bool { return smagicOK(8, int64(c)) } func smagicOK16(c int16) bool { return smagicOK(16, int64(c)) } func smagicOK32(c int32) bool { return smagicOK(32, int64(c)) }
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
// Signed divide, not a power of 2. Strength reduce to a multiply. (Div8 <t> x (Const8 [c])) && smagicOK8(c) => (Sub8 <t> (Rsh32x64 <t> (Mul32 <typ.UInt32> (Const32 <typ.UInt32> [int32(smagic8(c).m)]) (SignExt8to32 x)) (Const64 <typ.UInt64> [8+smagic8(c).s])) (Rsh32x64 <t> (SignExt8to32 x) (Const64 <typ.UInt64> [31])))
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
v5.AuxInt = int64ToAuxInt(int64(log8(c))) v.AddArg2(v0, v5) return true } // match: (Div8 <t> x (Const8 [c])) // cond: smagicOK8(c) // result: (Sub8 <t> (Rsh32x64 <t> (Mul32 <typ.UInt32> (Const32 <typ.UInt32> [int32(smagic8(c).m)]) (SignExt8to32 x)) (Const64 <typ.UInt64> [8+smagic8(c).s])) (Rsh32x64 <t> (SignExt8to32 x) (Const64 <typ.UInt64> [31]))) for { t := v.Type x := v_0 if v_1.Op != OpConst8 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 22 18:24:47 UTC 2024 - 812.2K bytes - Viewed (0)