aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/ssa/rewritegeneric.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/compile/internal/ssa/rewritegeneric.go')
-rw-r--r--src/cmd/compile/internal/ssa/rewritegeneric.go32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/cmd/compile/internal/ssa/rewritegeneric.go b/src/cmd/compile/internal/ssa/rewritegeneric.go
index 49c5facc32..ee74d7c971 100644
--- a/src/cmd/compile/internal/ssa/rewritegeneric.go
+++ b/src/cmd/compile/internal/ssa/rewritegeneric.go
@@ -7106,7 +7106,7 @@ func rewriteValuegeneric_OpDiv16u(v *Value) bool {
return true
}
// match: (Div16u n (Const16 [c]))
- // cond: isUnsignedPowerOfTwo(uint16(c))
+ // cond: isPowerOfTwo(uint16(c))
// result: (Rsh16Ux64 n (Const64 <typ.UInt64> [log16u(uint16(c))]))
for {
n := v_0
@@ -7114,7 +7114,7 @@ func rewriteValuegeneric_OpDiv16u(v *Value) bool {
break
}
c := auxIntToInt16(v_1.AuxInt)
- if !(isUnsignedPowerOfTwo(uint16(c))) {
+ if !(isPowerOfTwo(uint16(c))) {
break
}
v.reset(OpRsh16Ux64)
@@ -7259,7 +7259,7 @@ func rewriteValuegeneric_OpDiv32u(v *Value) bool {
return true
}
// match: (Div32u n (Const32 [c]))
- // cond: isUnsignedPowerOfTwo(uint32(c))
+ // cond: isPowerOfTwo(uint32(c))
// result: (Rsh32Ux64 n (Const64 <typ.UInt64> [log32u(uint32(c))]))
for {
n := v_0
@@ -7267,7 +7267,7 @@ func rewriteValuegeneric_OpDiv32u(v *Value) bool {
break
}
c := auxIntToInt32(v_1.AuxInt)
- if !(isUnsignedPowerOfTwo(uint32(c))) {
+ if !(isPowerOfTwo(uint32(c))) {
break
}
v.reset(OpRsh32Ux64)
@@ -7424,7 +7424,7 @@ func rewriteValuegeneric_OpDiv64u(v *Value) bool {
return true
}
// match: (Div64u n (Const64 [c]))
- // cond: isUnsignedPowerOfTwo(uint64(c))
+ // cond: isPowerOfTwo(uint64(c))
// result: (Rsh64Ux64 n (Const64 <typ.UInt64> [log64u(uint64(c))]))
for {
n := v_0
@@ -7432,7 +7432,7 @@ func rewriteValuegeneric_OpDiv64u(v *Value) bool {
break
}
c := auxIntToInt64(v_1.AuxInt)
- if !(isUnsignedPowerOfTwo(uint64(c))) {
+ if !(isPowerOfTwo(uint64(c))) {
break
}
v.reset(OpRsh64Ux64)
@@ -7533,7 +7533,7 @@ func rewriteValuegeneric_OpDiv8u(v *Value) bool {
return true
}
// match: (Div8u n (Const8 [c]))
- // cond: isUnsignedPowerOfTwo(uint8(c))
+ // cond: isPowerOfTwo(uint8(c))
// result: (Rsh8Ux64 n (Const64 <typ.UInt64> [log8u(uint8(c))]))
for {
n := v_0
@@ -7541,7 +7541,7 @@ func rewriteValuegeneric_OpDiv8u(v *Value) bool {
break
}
c := auxIntToInt8(v_1.AuxInt)
- if !(isUnsignedPowerOfTwo(uint8(c))) {
+ if !(isPowerOfTwo(uint8(c))) {
break
}
v.reset(OpRsh8Ux64)
@@ -15264,7 +15264,7 @@ func rewriteValuegeneric_OpMod16u(v *Value) bool {
return true
}
// match: (Mod16u <t> n (Const16 [c]))
- // cond: isUnsignedPowerOfTwo(uint16(c))
+ // cond: isPowerOfTwo(uint16(c))
// result: (And16 n (Const16 <t> [c-1]))
for {
t := v.Type
@@ -15273,7 +15273,7 @@ func rewriteValuegeneric_OpMod16u(v *Value) bool {
break
}
c := auxIntToInt16(v_1.AuxInt)
- if !(isUnsignedPowerOfTwo(uint16(c))) {
+ if !(isPowerOfTwo(uint16(c))) {
break
}
v.reset(OpAnd16)
@@ -15418,7 +15418,7 @@ func rewriteValuegeneric_OpMod32u(v *Value) bool {
return true
}
// match: (Mod32u <t> n (Const32 [c]))
- // cond: isUnsignedPowerOfTwo(uint32(c))
+ // cond: isPowerOfTwo(uint32(c))
// result: (And32 n (Const32 <t> [c-1]))
for {
t := v.Type
@@ -15427,7 +15427,7 @@ func rewriteValuegeneric_OpMod32u(v *Value) bool {
break
}
c := auxIntToInt32(v_1.AuxInt)
- if !(isUnsignedPowerOfTwo(uint32(c))) {
+ if !(isPowerOfTwo(uint32(c))) {
break
}
v.reset(OpAnd32)
@@ -15583,7 +15583,7 @@ func rewriteValuegeneric_OpMod64u(v *Value) bool {
return true
}
// match: (Mod64u <t> n (Const64 [c]))
- // cond: isUnsignedPowerOfTwo(uint64(c))
+ // cond: isPowerOfTwo(uint64(c))
// result: (And64 n (Const64 <t> [c-1]))
for {
t := v.Type
@@ -15592,7 +15592,7 @@ func rewriteValuegeneric_OpMod64u(v *Value) bool {
break
}
c := auxIntToInt64(v_1.AuxInt)
- if !(isUnsignedPowerOfTwo(uint64(c))) {
+ if !(isPowerOfTwo(uint64(c))) {
break
}
v.reset(OpAnd64)
@@ -15737,7 +15737,7 @@ func rewriteValuegeneric_OpMod8u(v *Value) bool {
return true
}
// match: (Mod8u <t> n (Const8 [c]))
- // cond: isUnsignedPowerOfTwo(uint8(c))
+ // cond: isPowerOfTwo(uint8(c))
// result: (And8 n (Const8 <t> [c-1]))
for {
t := v.Type
@@ -15746,7 +15746,7 @@ func rewriteValuegeneric_OpMod8u(v *Value) bool {
break
}
c := auxIntToInt8(v_1.AuxInt)
- if !(isUnsignedPowerOfTwo(uint8(c))) {
+ if !(isPowerOfTwo(uint8(c))) {
break
}
v.reset(OpAnd8)