(MUL x (MOVDconst [-1])) => (NEG x)
(MUL _ (MOVDconst [0])) => (MOVDconst [0])
(MUL x (MOVDconst [1])) => x
-(MUL x (MOVDconst [c])) && isPowerOfTwo64(c) => (SLLconst [log2(c)] x)
-(MUL x (MOVDconst [c])) && isPowerOfTwo64(c-1) && c >= 3 => (ADDshiftLL x x [log2(c-1)])
-(MUL x (MOVDconst [c])) && isPowerOfTwo64(c+1) && c >= 7 => (ADDshiftLL (NEG <x.Type> x) x [log2(c+1)])
-(MUL x (MOVDconst [c])) && c%3 == 0 && isPowerOfTwo64(c/3) => (SLLconst [log2(c/3)] (ADDshiftLL <x.Type> x x [1]))
-(MUL x (MOVDconst [c])) && c%5 == 0 && isPowerOfTwo64(c/5) => (SLLconst [log2(c/5)] (ADDshiftLL <x.Type> x x [2]))
-(MUL x (MOVDconst [c])) && c%7 == 0 && isPowerOfTwo64(c/7) => (SLLconst [log2(c/7)] (ADDshiftLL <x.Type> (NEG <x.Type> x) x [3]))
-(MUL x (MOVDconst [c])) && c%9 == 0 && isPowerOfTwo64(c/9) => (SLLconst [log2(c/9)] (ADDshiftLL <x.Type> x x [3]))
+(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]))
+(MUL x (MOVDconst [c])) && c%5 == 0 && isPowerOfTwo64(c/5) => (SLLconst [log64(c/5)] (ADDshiftLL <x.Type> x x [2]))
+(MUL x (MOVDconst [c])) && c%7 == 0 && isPowerOfTwo64(c/7) => (SLLconst [log64(c/7)] (ADDshiftLL <x.Type> (NEG <x.Type> x) x [3]))
+(MUL x (MOVDconst [c])) && c%9 == 0 && isPowerOfTwo64(c/9) => (SLLconst [log64(c/9)] (ADDshiftLL <x.Type> x x [3]))
(MULW x (MOVDconst [c])) && int32(c)==-1 => (NEG x)
(MULW _ (MOVDconst [c])) && int32(c)==0 => (MOVDconst [0])
(MULW x (MOVDconst [c])) && int32(c)==1 => x
-(MULW x (MOVDconst [c])) && isPowerOfTwo64(c) => (SLLconst [log2(c)] x)
-(MULW x (MOVDconst [c])) && isPowerOfTwo64(c-1) && int32(c) >= 3 => (ADDshiftLL x x [log2(c-1)])
-(MULW x (MOVDconst [c])) && isPowerOfTwo64(c+1) && int32(c) >= 7 => (ADDshiftLL (NEG <x.Type> x) x [log2(c+1)])
-(MULW x (MOVDconst [c])) && c%3 == 0 && isPowerOfTwo64(c/3) && is32Bit(c) => (SLLconst [log2(c/3)] (ADDshiftLL <x.Type> x x [1]))
-(MULW x (MOVDconst [c])) && c%5 == 0 && isPowerOfTwo64(c/5) && is32Bit(c) => (SLLconst [log2(c/5)] (ADDshiftLL <x.Type> x x [2]))
-(MULW x (MOVDconst [c])) && c%7 == 0 && isPowerOfTwo64(c/7) && is32Bit(c) => (SLLconst [log2(c/7)] (ADDshiftLL <x.Type> (NEG <x.Type> x) x [3]))
-(MULW x (MOVDconst [c])) && c%9 == 0 && isPowerOfTwo64(c/9) && is32Bit(c) => (SLLconst [log2(c/9)] (ADDshiftLL <x.Type> x x [3]))
+(MULW x (MOVDconst [c])) && isPowerOfTwo64(c) => (SLLconst [log64(c)] x)
+(MULW x (MOVDconst [c])) && isPowerOfTwo64(c-1) && int32(c) >= 3 => (ADDshiftLL x x [log64(c-1)])
+(MULW x (MOVDconst [c])) && isPowerOfTwo64(c+1) && int32(c) >= 7 => (ADDshiftLL (NEG <x.Type> x) x [log64(c+1)])
+(MULW x (MOVDconst [c])) && c%3 == 0 && isPowerOfTwo64(c/3) && is32Bit(c) => (SLLconst [log64(c/3)] (ADDshiftLL <x.Type> x x [1]))
+(MULW x (MOVDconst [c])) && c%5 == 0 && isPowerOfTwo64(c/5) && is32Bit(c) => (SLLconst [log64(c/5)] (ADDshiftLL <x.Type> x x [2]))
+(MULW x (MOVDconst [c])) && c%7 == 0 && isPowerOfTwo64(c/7) && is32Bit(c) => (SLLconst [log64(c/7)] (ADDshiftLL <x.Type> (NEG <x.Type> x) x [3]))
+(MULW x (MOVDconst [c])) && c%9 == 0 && isPowerOfTwo64(c/9) && is32Bit(c) => (SLLconst [log64(c/9)] (ADDshiftLL <x.Type> x x [3]))
// mneg by constant
(MNEG x (MOVDconst [-1])) => x
(MNEG _ (MOVDconst [0])) => (MOVDconst [0])
(MNEG x (MOVDconst [1])) => (NEG x)
-(MNEG x (MOVDconst [c])) && isPowerOfTwo64(c) => (NEG (SLLconst <x.Type> [log2(c)] x))
-(MNEG x (MOVDconst [c])) && isPowerOfTwo64(c-1) && c >= 3 => (NEG (ADDshiftLL <x.Type> x x [log2(c-1)]))
-(MNEG x (MOVDconst [c])) && isPowerOfTwo64(c+1) && c >= 7 => (NEG (ADDshiftLL <x.Type> (NEG <x.Type> x) x [log2(c+1)]))
-(MNEG x (MOVDconst [c])) && c%3 == 0 && isPowerOfTwo64(c/3) => (SLLconst <x.Type> [log2(c/3)] (SUBshiftLL <x.Type> x x [2]))
-(MNEG x (MOVDconst [c])) && c%5 == 0 && isPowerOfTwo64(c/5) => (NEG (SLLconst <x.Type> [log2(c/5)] (ADDshiftLL <x.Type> x x [2])))
-(MNEG x (MOVDconst [c])) && c%7 == 0 && isPowerOfTwo64(c/7) => (SLLconst <x.Type> [log2(c/7)] (SUBshiftLL <x.Type> x x [3]))
-(MNEG x (MOVDconst [c])) && c%9 == 0 && isPowerOfTwo64(c/9) => (NEG (SLLconst <x.Type> [log2(c/9)] (ADDshiftLL <x.Type> x x [3])))
+(MNEG x (MOVDconst [c])) && isPowerOfTwo64(c) => (NEG (SLLconst <x.Type> [log64(c)] x))
+(MNEG x (MOVDconst [c])) && isPowerOfTwo64(c-1) && c >= 3 => (NEG (ADDshiftLL <x.Type> x x [log64(c-1)]))
+(MNEG x (MOVDconst [c])) && isPowerOfTwo64(c+1) && c >= 7 => (NEG (ADDshiftLL <x.Type> (NEG <x.Type> x) x [log64(c+1)]))
+(MNEG x (MOVDconst [c])) && c%3 == 0 && isPowerOfTwo64(c/3) => (SLLconst <x.Type> [log64(c/3)] (SUBshiftLL <x.Type> x x [2]))
+(MNEG x (MOVDconst [c])) && c%5 == 0 && isPowerOfTwo64(c/5) => (NEG (SLLconst <x.Type> [log64(c/5)] (ADDshiftLL <x.Type> x x [2])))
+(MNEG x (MOVDconst [c])) && c%7 == 0 && isPowerOfTwo64(c/7) => (SLLconst <x.Type> [log64(c/7)] (SUBshiftLL <x.Type> x x [3]))
+(MNEG x (MOVDconst [c])) && c%9 == 0 && isPowerOfTwo64(c/9) => (NEG (SLLconst <x.Type> [log64(c/9)] (ADDshiftLL <x.Type> x x [3])))
+
(MNEGW x (MOVDconst [c])) && int32(c)==-1 => x
(MNEGW _ (MOVDconst [c])) && int32(c)==0 => (MOVDconst [0])
(MNEGW x (MOVDconst [c])) && int32(c)==1 => (NEG x)
-(MNEGW x (MOVDconst [c])) && isPowerOfTwo64(c) => (NEG (SLLconst <x.Type> [log2(c)] x))
-(MNEGW x (MOVDconst [c])) && isPowerOfTwo64(c-1) && int32(c) >= 3 => (NEG (ADDshiftLL <x.Type> x x [log2(c-1)]))
-(MNEGW x (MOVDconst [c])) && isPowerOfTwo64(c+1) && int32(c) >= 7 => (NEG (ADDshiftLL <x.Type> (NEG <x.Type> x) x [log2(c+1)]))
-(MNEGW x (MOVDconst [c])) && c%3 == 0 && isPowerOfTwo64(c/3) && is32Bit(c) => (SLLconst <x.Type> [log2(c/3)] (SUBshiftLL <x.Type> x x [2]))
-(MNEGW x (MOVDconst [c])) && c%5 == 0 && isPowerOfTwo64(c/5) && is32Bit(c) => (NEG (SLLconst <x.Type> [log2(c/5)] (ADDshiftLL <x.Type> x x [2])))
-(MNEGW x (MOVDconst [c])) && c%7 == 0 && isPowerOfTwo64(c/7) && is32Bit(c) => (SLLconst <x.Type> [log2(c/7)] (SUBshiftLL <x.Type> x x [3]))
-(MNEGW x (MOVDconst [c])) && c%9 == 0 && isPowerOfTwo64(c/9) && is32Bit(c) => (NEG (SLLconst <x.Type> [log2(c/9)] (ADDshiftLL <x.Type> x x [3])))
+(MNEGW x (MOVDconst [c])) && isPowerOfTwo64(c) => (NEG (SLLconst <x.Type> [log64(c)] x))
+(MNEGW x (MOVDconst [c])) && isPowerOfTwo64(c-1) && int32(c) >= 3 => (NEG (ADDshiftLL <x.Type> x x [log64(c-1)]))
+(MNEGW x (MOVDconst [c])) && isPowerOfTwo64(c+1) && int32(c) >= 7 => (NEG (ADDshiftLL <x.Type> (NEG <x.Type> x) x [log64(c+1)]))
+(MNEGW x (MOVDconst [c])) && c%3 == 0 && isPowerOfTwo64(c/3) && is32Bit(c) => (SLLconst <x.Type> [log64(c/3)] (SUBshiftLL <x.Type> x x [2]))
+(MNEGW x (MOVDconst [c])) && c%5 == 0 && isPowerOfTwo64(c/5) && is32Bit(c) => (NEG (SLLconst <x.Type> [log64(c/5)] (ADDshiftLL <x.Type> x x [2])))
+(MNEGW x (MOVDconst [c])) && c%7 == 0 && isPowerOfTwo64(c/7) && is32Bit(c) => (SLLconst <x.Type> [log64(c/7)] (SUBshiftLL <x.Type> x x [3]))
+(MNEGW x (MOVDconst [c])) && c%9 == 0 && isPowerOfTwo64(c/9) && is32Bit(c) => (NEG (SLLconst <x.Type> [log64(c/9)] (ADDshiftLL <x.Type> x x [3])))
+
(MADD a x (MOVDconst [-1])) => (SUB a x)
(MADD a _ (MOVDconst [0])) => a
(MADD a x (MOVDconst [1])) => (ADD a x)
-(MADD a x (MOVDconst [c])) && isPowerOfTwo64(c) => (ADDshiftLL a x [log2(c)])
-(MADD a x (MOVDconst [c])) && isPowerOfTwo64(c-1) && c>=3 => (ADD a (ADDshiftLL <x.Type> x x [log2(c-1)]))
-(MADD a x (MOVDconst [c])) && isPowerOfTwo64(c+1) && c>=7 => (SUB a (SUBshiftLL <x.Type> x x [log2(c+1)]))
-(MADD a x (MOVDconst [c])) && c%3 == 0 && isPowerOfTwo64(c/3) => (SUBshiftLL a (SUBshiftLL <x.Type> x x [2]) [log2(c/3)])
-(MADD a x (MOVDconst [c])) && c%5 == 0 && isPowerOfTwo64(c/5) => (ADDshiftLL a (ADDshiftLL <x.Type> x x [2]) [log2(c/5)])
-(MADD a x (MOVDconst [c])) && c%7 == 0 && isPowerOfTwo64(c/7) => (SUBshiftLL a (SUBshiftLL <x.Type> x x [3]) [log2(c/7)])
-(MADD a x (MOVDconst [c])) && c%9 == 0 && isPowerOfTwo64(c/9) => (ADDshiftLL a (ADDshiftLL <x.Type> x x [3]) [log2(c/9)])
+(MADD a x (MOVDconst [c])) && isPowerOfTwo64(c) => (ADDshiftLL a x [log64(c)])
+(MADD a x (MOVDconst [c])) && isPowerOfTwo64(c-1) && c>=3 => (ADD a (ADDshiftLL <x.Type> x x [log64(c-1)]))
+(MADD a x (MOVDconst [c])) && isPowerOfTwo64(c+1) && c>=7 => (SUB a (SUBshiftLL <x.Type> x x [log64(c+1)]))
+(MADD a x (MOVDconst [c])) && c%3 == 0 && isPowerOfTwo64(c/3) => (SUBshiftLL a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)])
+(MADD a x (MOVDconst [c])) && c%5 == 0 && isPowerOfTwo64(c/5) => (ADDshiftLL a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)])
+(MADD a x (MOVDconst [c])) && c%7 == 0 && isPowerOfTwo64(c/7) => (SUBshiftLL a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)])
+(MADD a x (MOVDconst [c])) && c%9 == 0 && isPowerOfTwo64(c/9) => (ADDshiftLL a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)])
(MADD a (MOVDconst [-1]) x) => (SUB a x)
(MADD a (MOVDconst [0]) _) => a
(MADD a (MOVDconst [1]) x) => (ADD a x)
-(MADD a (MOVDconst [c]) x) && isPowerOfTwo64(c) => (ADDshiftLL a x [log2(c)])
-(MADD a (MOVDconst [c]) x) && isPowerOfTwo64(c-1) && c>=3 => (ADD a (ADDshiftLL <x.Type> x x [log2(c-1)]))
-(MADD a (MOVDconst [c]) x) && isPowerOfTwo64(c+1) && c>=7 => (SUB a (SUBshiftLL <x.Type> x x [log2(c+1)]))
-(MADD a (MOVDconst [c]) x) && c%3 == 0 && isPowerOfTwo64(c/3) => (SUBshiftLL a (SUBshiftLL <x.Type> x x [2]) [log2(c/3)])
-(MADD a (MOVDconst [c]) x) && c%5 == 0 && isPowerOfTwo64(c/5) => (ADDshiftLL a (ADDshiftLL <x.Type> x x [2]) [log2(c/5)])
-(MADD a (MOVDconst [c]) x) && c%7 == 0 && isPowerOfTwo64(c/7) => (SUBshiftLL a (SUBshiftLL <x.Type> x x [3]) [log2(c/7)])
-(MADD a (MOVDconst [c]) x) && c%9 == 0 && isPowerOfTwo64(c/9) => (ADDshiftLL a (ADDshiftLL <x.Type> x x [3]) [log2(c/9)])
+(MADD a (MOVDconst [c]) x) && isPowerOfTwo64(c) => (ADDshiftLL a x [log64(c)])
+(MADD a (MOVDconst [c]) x) && isPowerOfTwo64(c-1) && c>=3 => (ADD a (ADDshiftLL <x.Type> x x [log64(c-1)]))
+(MADD a (MOVDconst [c]) x) && isPowerOfTwo64(c+1) && c>=7 => (SUB a (SUBshiftLL <x.Type> x x [log64(c+1)]))
+(MADD a (MOVDconst [c]) x) && c%3 == 0 && isPowerOfTwo64(c/3) => (SUBshiftLL a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)])
+(MADD a (MOVDconst [c]) x) && c%5 == 0 && isPowerOfTwo64(c/5) => (ADDshiftLL a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)])
+(MADD a (MOVDconst [c]) x) && c%7 == 0 && isPowerOfTwo64(c/7) => (SUBshiftLL a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)])
+(MADD a (MOVDconst [c]) x) && c%9 == 0 && isPowerOfTwo64(c/9) => (ADDshiftLL a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)])
(MADDW a x (MOVDconst [c])) && int32(c)==-1 => (SUB a x)
(MADDW a _ (MOVDconst [c])) && int32(c)==0 => a
(MADDW a x (MOVDconst [c])) && int32(c)==1 => (ADD a x)
-(MADDW a x (MOVDconst [c])) && isPowerOfTwo64(c) => (ADDshiftLL a x [log2(c)])
-(MADDW a x (MOVDconst [c])) && isPowerOfTwo64(c-1) && int32(c)>=3 => (ADD a (ADDshiftLL <x.Type> x x [log2(c-1)]))
-(MADDW a x (MOVDconst [c])) && isPowerOfTwo64(c+1) && int32(c)>=7 => (SUB a (SUBshiftLL <x.Type> x x [log2(c+1)]))
-(MADDW a x (MOVDconst [c])) && c%3 == 0 && isPowerOfTwo64(c/3) && is32Bit(c) => (SUBshiftLL a (SUBshiftLL <x.Type> x x [2]) [log2(c/3)])
-(MADDW a x (MOVDconst [c])) && c%5 == 0 && isPowerOfTwo64(c/5) && is32Bit(c) => (ADDshiftLL a (ADDshiftLL <x.Type> x x [2]) [log2(c/5)])
-(MADDW a x (MOVDconst [c])) && c%7 == 0 && isPowerOfTwo64(c/7) && is32Bit(c) => (SUBshiftLL a (SUBshiftLL <x.Type> x x [3]) [log2(c/7)])
-(MADDW a x (MOVDconst [c])) && c%9 == 0 && isPowerOfTwo64(c/9) && is32Bit(c) => (ADDshiftLL a (ADDshiftLL <x.Type> x x [3]) [log2(c/9)])
+(MADDW a x (MOVDconst [c])) && isPowerOfTwo64(c) => (ADDshiftLL a x [log64(c)])
+(MADDW a x (MOVDconst [c])) && isPowerOfTwo64(c-1) && int32(c)>=3 => (ADD a (ADDshiftLL <x.Type> x x [log64(c-1)]))
+(MADDW a x (MOVDconst [c])) && isPowerOfTwo64(c+1) && int32(c)>=7 => (SUB a (SUBshiftLL <x.Type> x x [log64(c+1)]))
+(MADDW a x (MOVDconst [c])) && c%3 == 0 && isPowerOfTwo64(c/3) && is32Bit(c) => (SUBshiftLL a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)])
+(MADDW a x (MOVDconst [c])) && c%5 == 0 && isPowerOfTwo64(c/5) && is32Bit(c) => (ADDshiftLL a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)])
+(MADDW a x (MOVDconst [c])) && c%7 == 0 && isPowerOfTwo64(c/7) && is32Bit(c) => (SUBshiftLL a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)])
+(MADDW a x (MOVDconst [c])) && c%9 == 0 && isPowerOfTwo64(c/9) && is32Bit(c) => (ADDshiftLL a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)])
(MADDW a (MOVDconst [c]) x) && int32(c)==-1 => (SUB a x)
(MADDW a (MOVDconst [c]) _) && int32(c)==0 => a
(MADDW a (MOVDconst [c]) x) && int32(c)==1 => (ADD a x)
-(MADDW a (MOVDconst [c]) x) && isPowerOfTwo64(c) => (ADDshiftLL a x [log2(c)])
-(MADDW a (MOVDconst [c]) x) && isPowerOfTwo64(c-1) && int32(c)>=3 => (ADD a (ADDshiftLL <x.Type> x x [log2(c-1)]))
-(MADDW a (MOVDconst [c]) x) && isPowerOfTwo64(c+1) && int32(c)>=7 => (SUB a (SUBshiftLL <x.Type> x x [log2(c+1)]))
-(MADDW a (MOVDconst [c]) x) && c%3 == 0 && isPowerOfTwo64(c/3) && is32Bit(c) => (SUBshiftLL a (SUBshiftLL <x.Type> x x [2]) [log2(c/3)])
-(MADDW a (MOVDconst [c]) x) && c%5 == 0 && isPowerOfTwo64(c/5) && is32Bit(c) => (ADDshiftLL a (ADDshiftLL <x.Type> x x [2]) [log2(c/5)])
-(MADDW a (MOVDconst [c]) x) && c%7 == 0 && isPowerOfTwo64(c/7) && is32Bit(c) => (SUBshiftLL a (SUBshiftLL <x.Type> x x [3]) [log2(c/7)])
-(MADDW a (MOVDconst [c]) x) && c%9 == 0 && isPowerOfTwo64(c/9) && is32Bit(c) => (ADDshiftLL a (ADDshiftLL <x.Type> x x [3]) [log2(c/9)])
+(MADDW a (MOVDconst [c]) x) && isPowerOfTwo64(c) => (ADDshiftLL a x [log64(c)])
+(MADDW a (MOVDconst [c]) x) && isPowerOfTwo64(c-1) && int32(c)>=3 => (ADD a (ADDshiftLL <x.Type> x x [log64(c-1)]))
+(MADDW a (MOVDconst [c]) x) && isPowerOfTwo64(c+1) && int32(c)>=7 => (SUB a (SUBshiftLL <x.Type> x x [log64(c+1)]))
+(MADDW a (MOVDconst [c]) x) && c%3 == 0 && isPowerOfTwo64(c/3) && is32Bit(c) => (SUBshiftLL a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)])
+(MADDW a (MOVDconst [c]) x) && c%5 == 0 && isPowerOfTwo64(c/5) && is32Bit(c) => (ADDshiftLL a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)])
+(MADDW a (MOVDconst [c]) x) && c%7 == 0 && isPowerOfTwo64(c/7) && is32Bit(c) => (SUBshiftLL a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)])
+(MADDW a (MOVDconst [c]) x) && c%9 == 0 && isPowerOfTwo64(c/9) && is32Bit(c) => (ADDshiftLL a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)])
(MSUB a x (MOVDconst [-1])) => (ADD a x)
(MSUB a _ (MOVDconst [0])) => a
(MSUB a x (MOVDconst [1])) => (SUB a x)
-(MSUB a x (MOVDconst [c])) && isPowerOfTwo64(c) => (SUBshiftLL a x [log2(c)])
-(MSUB a x (MOVDconst [c])) && isPowerOfTwo64(c-1) && c>=3 => (SUB a (ADDshiftLL <x.Type> x x [log2(c-1)]))
-(MSUB a x (MOVDconst [c])) && isPowerOfTwo64(c+1) && c>=7 => (ADD a (SUBshiftLL <x.Type> x x [log2(c+1)]))
-(MSUB a x (MOVDconst [c])) && c%3 == 0 && isPowerOfTwo64(c/3) => (ADDshiftLL a (SUBshiftLL <x.Type> x x [2]) [log2(c/3)])
-(MSUB a x (MOVDconst [c])) && c%5 == 0 && isPowerOfTwo64(c/5) => (SUBshiftLL a (ADDshiftLL <x.Type> x x [2]) [log2(c/5)])
-(MSUB a x (MOVDconst [c])) && c%7 == 0 && isPowerOfTwo64(c/7) => (ADDshiftLL a (SUBshiftLL <x.Type> x x [3]) [log2(c/7)])
-(MSUB a x (MOVDconst [c])) && c%9 == 0 && isPowerOfTwo64(c/9) => (SUBshiftLL a (ADDshiftLL <x.Type> x x [3]) [log2(c/9)])
+(MSUB a x (MOVDconst [c])) && isPowerOfTwo64(c) => (SUBshiftLL a x [log64(c)])
+(MSUB a x (MOVDconst [c])) && isPowerOfTwo64(c-1) && c>=3 => (SUB a (ADDshiftLL <x.Type> x x [log64(c-1)]))
+(MSUB a x (MOVDconst [c])) && isPowerOfTwo64(c+1) && c>=7 => (ADD a (SUBshiftLL <x.Type> x x [log64(c+1)]))
+(MSUB a x (MOVDconst [c])) && c%3 == 0 && isPowerOfTwo64(c/3) => (ADDshiftLL a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)])
+(MSUB a x (MOVDconst [c])) && c%5 == 0 && isPowerOfTwo64(c/5) => (SUBshiftLL a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)])
+(MSUB a x (MOVDconst [c])) && c%7 == 0 && isPowerOfTwo64(c/7) => (ADDshiftLL a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)])
+(MSUB a x (MOVDconst [c])) && c%9 == 0 && isPowerOfTwo64(c/9) => (SUBshiftLL a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)])
(MSUB a (MOVDconst [-1]) x) => (ADD a x)
(MSUB a (MOVDconst [0]) _) => a
(MSUB a (MOVDconst [1]) x) => (SUB a x)
-(MSUB a (MOVDconst [c]) x) && isPowerOfTwo64(c) => (SUBshiftLL a x [log2(c)])
-(MSUB a (MOVDconst [c]) x) && isPowerOfTwo64(c-1) && c>=3 => (SUB a (ADDshiftLL <x.Type> x x [log2(c-1)]))
-(MSUB a (MOVDconst [c]) x) && isPowerOfTwo64(c+1) && c>=7 => (ADD a (SUBshiftLL <x.Type> x x [log2(c+1)]))
-(MSUB a (MOVDconst [c]) x) && c%3 == 0 && isPowerOfTwo64(c/3) => (ADDshiftLL a (SUBshiftLL <x.Type> x x [2]) [log2(c/3)])
-(MSUB a (MOVDconst [c]) x) && c%5 == 0 && isPowerOfTwo64(c/5) => (SUBshiftLL a (ADDshiftLL <x.Type> x x [2]) [log2(c/5)])
-(MSUB a (MOVDconst [c]) x) && c%7 == 0 && isPowerOfTwo64(c/7) => (ADDshiftLL a (SUBshiftLL <x.Type> x x [3]) [log2(c/7)])
-(MSUB a (MOVDconst [c]) x) && c%9 == 0 && isPowerOfTwo64(c/9) => (SUBshiftLL a (ADDshiftLL <x.Type> x x [3]) [log2(c/9)])
+(MSUB a (MOVDconst [c]) x) && isPowerOfTwo64(c) => (SUBshiftLL a x [log64(c)])
+(MSUB a (MOVDconst [c]) x) && isPowerOfTwo64(c-1) && c>=3 => (SUB a (ADDshiftLL <x.Type> x x [log64(c-1)]))
+(MSUB a (MOVDconst [c]) x) && isPowerOfTwo64(c+1) && c>=7 => (ADD a (SUBshiftLL <x.Type> x x [log64(c+1)]))
+(MSUB a (MOVDconst [c]) x) && c%3 == 0 && isPowerOfTwo64(c/3) => (ADDshiftLL a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)])
+(MSUB a (MOVDconst [c]) x) && c%5 == 0 && isPowerOfTwo64(c/5) => (SUBshiftLL a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)])
+(MSUB a (MOVDconst [c]) x) && c%7 == 0 && isPowerOfTwo64(c/7) => (ADDshiftLL a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)])
+(MSUB a (MOVDconst [c]) x) && c%9 == 0 && isPowerOfTwo64(c/9) => (SUBshiftLL a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)])
(MSUBW a x (MOVDconst [c])) && int32(c)==-1 => (ADD a x)
(MSUBW a _ (MOVDconst [c])) && int32(c)==0 => a
(MSUBW a x (MOVDconst [c])) && int32(c)==1 => (SUB a x)
-(MSUBW a x (MOVDconst [c])) && isPowerOfTwo64(c) => (SUBshiftLL a x [log2(c)])
-(MSUBW a x (MOVDconst [c])) && isPowerOfTwo64(c-1) && int32(c)>=3 => (SUB a (ADDshiftLL <x.Type> x x [log2(c-1)]))
-(MSUBW a x (MOVDconst [c])) && isPowerOfTwo64(c+1) && int32(c)>=7 => (ADD a (SUBshiftLL <x.Type> x x [log2(c+1)]))
-(MSUBW a x (MOVDconst [c])) && c%3 == 0 && isPowerOfTwo64(c/3) && is32Bit(c) => (ADDshiftLL a (SUBshiftLL <x.Type> x x [2]) [log2(c/3)])
-(MSUBW a x (MOVDconst [c])) && c%5 == 0 && isPowerOfTwo64(c/5) && is32Bit(c) => (SUBshiftLL a (ADDshiftLL <x.Type> x x [2]) [log2(c/5)])
-(MSUBW a x (MOVDconst [c])) && c%7 == 0 && isPowerOfTwo64(c/7) && is32Bit(c) => (ADDshiftLL a (SUBshiftLL <x.Type> x x [3]) [log2(c/7)])
-(MSUBW a x (MOVDconst [c])) && c%9 == 0 && isPowerOfTwo64(c/9) && is32Bit(c) => (SUBshiftLL a (ADDshiftLL <x.Type> x x [3]) [log2(c/9)])
+(MSUBW a x (MOVDconst [c])) && isPowerOfTwo64(c) => (SUBshiftLL a x [log64(c)])
+(MSUBW a x (MOVDconst [c])) && isPowerOfTwo64(c-1) && int32(c)>=3 => (SUB a (ADDshiftLL <x.Type> x x [log64(c-1)]))
+(MSUBW a x (MOVDconst [c])) && isPowerOfTwo64(c+1) && int32(c)>=7 => (ADD a (SUBshiftLL <x.Type> x x [log64(c+1)]))
+(MSUBW a x (MOVDconst [c])) && c%3 == 0 && isPowerOfTwo64(c/3) && is32Bit(c) => (ADDshiftLL a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)])
+(MSUBW a x (MOVDconst [c])) && c%5 == 0 && isPowerOfTwo64(c/5) && is32Bit(c) => (SUBshiftLL a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)])
+(MSUBW a x (MOVDconst [c])) && c%7 == 0 && isPowerOfTwo64(c/7) && is32Bit(c) => (ADDshiftLL a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)])
+(MSUBW a x (MOVDconst [c])) && c%9 == 0 && isPowerOfTwo64(c/9) && is32Bit(c) => (SUBshiftLL a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)])
(MSUBW a (MOVDconst [c]) x) && int32(c)==-1 => (ADD a x)
(MSUBW a (MOVDconst [c]) _) && int32(c)==0 => a
(MSUBW a (MOVDconst [c]) x) && int32(c)==1 => (SUB a x)
-(MSUBW a (MOVDconst [c]) x) && isPowerOfTwo64(c) => (SUBshiftLL a x [log2(c)])
-(MSUBW a (MOVDconst [c]) x) && isPowerOfTwo64(c-1) && int32(c)>=3 => (SUB a (ADDshiftLL <x.Type> x x [log2(c-1)]))
-(MSUBW a (MOVDconst [c]) x) && isPowerOfTwo64(c+1) && int32(c)>=7 => (ADD a (SUBshiftLL <x.Type> x x [log2(c+1)]))
-(MSUBW a (MOVDconst [c]) x) && c%3 == 0 && isPowerOfTwo64(c/3) && is32Bit(c) => (ADDshiftLL a (SUBshiftLL <x.Type> x x [2]) [log2(c/3)])
-(MSUBW a (MOVDconst [c]) x) && c%5 == 0 && isPowerOfTwo64(c/5) && is32Bit(c) => (SUBshiftLL a (ADDshiftLL <x.Type> x x [2]) [log2(c/5)])
-(MSUBW a (MOVDconst [c]) x) && c%7 == 0 && isPowerOfTwo64(c/7) && is32Bit(c) => (ADDshiftLL a (SUBshiftLL <x.Type> x x [3]) [log2(c/7)])
-(MSUBW a (MOVDconst [c]) x) && c%9 == 0 && isPowerOfTwo64(c/9) && is32Bit(c) => (SUBshiftLL a (ADDshiftLL <x.Type> x x [3]) [log2(c/9)])
+(MSUBW a (MOVDconst [c]) x) && isPowerOfTwo64(c) => (SUBshiftLL a x [log64(c)])
+(MSUBW a (MOVDconst [c]) x) && isPowerOfTwo64(c-1) && int32(c)>=3 => (SUB a (ADDshiftLL <x.Type> x x [log64(c-1)]))
+(MSUBW a (MOVDconst [c]) x) && isPowerOfTwo64(c+1) && int32(c)>=7 => (ADD a (SUBshiftLL <x.Type> x x [log64(c+1)]))
+(MSUBW a (MOVDconst [c]) x) && c%3 == 0 && isPowerOfTwo64(c/3) && is32Bit(c) => (ADDshiftLL a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)])
+(MSUBW a (MOVDconst [c]) x) && c%5 == 0 && isPowerOfTwo64(c/5) && is32Bit(c) => (SUBshiftLL a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)])
+(MSUBW a (MOVDconst [c]) x) && c%7 == 0 && isPowerOfTwo64(c/7) && is32Bit(c) => (ADDshiftLL a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)])
+(MSUBW a (MOVDconst [c]) x) && c%9 == 0 && isPowerOfTwo64(c/9) && is32Bit(c) => (SUBshiftLL a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)])
// div by constant
(UDIV x (MOVDconst [1])) => x
-(UDIV x (MOVDconst [c])) && isPowerOfTwo64(c) => (SRLconst [log2(c)] x)
+(UDIV x (MOVDconst [c])) && isPowerOfTwo64(c) => (SRLconst [log64(c)] x)
(UDIVW x (MOVDconst [c])) && uint32(c)==1 => x
-(UDIVW x (MOVDconst [c])) && isPowerOfTwo64(c) && is32Bit(c) => (SRLconst [log2(c)] x)
+(UDIVW x (MOVDconst [c])) && isPowerOfTwo64(c) && is32Bit(c) => (SRLconst [log64(c)] x)
(UMOD _ (MOVDconst [1])) => (MOVDconst [0])
(UMOD x (MOVDconst [c])) && isPowerOfTwo64(c) => (ANDconst [c-1] x)
(UMODW _ (MOVDconst [c])) && uint32(c)==1 => (MOVDconst [0])
}
// match: (MADD a x (MOVDconst [c]))
// cond: isPowerOfTwo64(c)
- // result: (ADDshiftLL a x [log2(c)])
+ // result: (ADDshiftLL a x [log64(c)])
for {
a := v_0
x := v_1
break
}
v.reset(OpARM64ADDshiftLL)
- v.AuxInt = int64ToAuxInt(log2(c))
+ v.AuxInt = int64ToAuxInt(log64(c))
v.AddArg2(a, x)
return true
}
// match: (MADD a x (MOVDconst [c]))
// cond: isPowerOfTwo64(c-1) && c>=3
- // result: (ADD a (ADDshiftLL <x.Type> x x [log2(c-1)]))
+ // result: (ADD a (ADDshiftLL <x.Type> x x [log64(c-1)]))
for {
a := v_0
x := v_1
}
v.reset(OpARM64ADD)
v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
- v0.AuxInt = int64ToAuxInt(log2(c - 1))
+ v0.AuxInt = int64ToAuxInt(log64(c - 1))
v0.AddArg2(x, x)
v.AddArg2(a, v0)
return true
}
// match: (MADD a x (MOVDconst [c]))
// cond: isPowerOfTwo64(c+1) && c>=7
- // result: (SUB a (SUBshiftLL <x.Type> x x [log2(c+1)]))
+ // result: (SUB a (SUBshiftLL <x.Type> x x [log64(c+1)]))
for {
a := v_0
x := v_1
}
v.reset(OpARM64SUB)
v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
- v0.AuxInt = int64ToAuxInt(log2(c + 1))
+ v0.AuxInt = int64ToAuxInt(log64(c + 1))
v0.AddArg2(x, x)
v.AddArg2(a, v0)
return true
}
// match: (MADD a x (MOVDconst [c]))
// cond: c%3 == 0 && isPowerOfTwo64(c/3)
- // result: (SUBshiftLL a (SUBshiftLL <x.Type> x x [2]) [log2(c/3)])
+ // result: (SUBshiftLL a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)])
for {
a := v_0
x := v_1
break
}
v.reset(OpARM64SUBshiftLL)
- v.AuxInt = int64ToAuxInt(log2(c / 3))
+ v.AuxInt = int64ToAuxInt(log64(c / 3))
v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
v0.AuxInt = int64ToAuxInt(2)
v0.AddArg2(x, x)
}
// match: (MADD a x (MOVDconst [c]))
// cond: c%5 == 0 && isPowerOfTwo64(c/5)
- // result: (ADDshiftLL a (ADDshiftLL <x.Type> x x [2]) [log2(c/5)])
+ // result: (ADDshiftLL a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)])
for {
a := v_0
x := v_1
break
}
v.reset(OpARM64ADDshiftLL)
- v.AuxInt = int64ToAuxInt(log2(c / 5))
+ v.AuxInt = int64ToAuxInt(log64(c / 5))
v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
v0.AuxInt = int64ToAuxInt(2)
v0.AddArg2(x, x)
}
// match: (MADD a x (MOVDconst [c]))
// cond: c%7 == 0 && isPowerOfTwo64(c/7)
- // result: (SUBshiftLL a (SUBshiftLL <x.Type> x x [3]) [log2(c/7)])
+ // result: (SUBshiftLL a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)])
for {
a := v_0
x := v_1
break
}
v.reset(OpARM64SUBshiftLL)
- v.AuxInt = int64ToAuxInt(log2(c / 7))
+ v.AuxInt = int64ToAuxInt(log64(c / 7))
v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
v0.AuxInt = int64ToAuxInt(3)
v0.AddArg2(x, x)
}
// match: (MADD a x (MOVDconst [c]))
// cond: c%9 == 0 && isPowerOfTwo64(c/9)
- // result: (ADDshiftLL a (ADDshiftLL <x.Type> x x [3]) [log2(c/9)])
+ // result: (ADDshiftLL a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)])
for {
a := v_0
x := v_1
break
}
v.reset(OpARM64ADDshiftLL)
- v.AuxInt = int64ToAuxInt(log2(c / 9))
+ v.AuxInt = int64ToAuxInt(log64(c / 9))
v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
v0.AuxInt = int64ToAuxInt(3)
v0.AddArg2(x, x)
}
// match: (MADD a (MOVDconst [c]) x)
// cond: isPowerOfTwo64(c)
- // result: (ADDshiftLL a x [log2(c)])
+ // result: (ADDshiftLL a x [log64(c)])
for {
a := v_0
if v_1.Op != OpARM64MOVDconst {
break
}
v.reset(OpARM64ADDshiftLL)
- v.AuxInt = int64ToAuxInt(log2(c))
+ v.AuxInt = int64ToAuxInt(log64(c))
v.AddArg2(a, x)
return true
}
// match: (MADD a (MOVDconst [c]) x)
// cond: isPowerOfTwo64(c-1) && c>=3
- // result: (ADD a (ADDshiftLL <x.Type> x x [log2(c-1)]))
+ // result: (ADD a (ADDshiftLL <x.Type> x x [log64(c-1)]))
for {
a := v_0
if v_1.Op != OpARM64MOVDconst {
}
v.reset(OpARM64ADD)
v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
- v0.AuxInt = int64ToAuxInt(log2(c - 1))
+ v0.AuxInt = int64ToAuxInt(log64(c - 1))
v0.AddArg2(x, x)
v.AddArg2(a, v0)
return true
}
// match: (MADD a (MOVDconst [c]) x)
// cond: isPowerOfTwo64(c+1) && c>=7
- // result: (SUB a (SUBshiftLL <x.Type> x x [log2(c+1)]))
+ // result: (SUB a (SUBshiftLL <x.Type> x x [log64(c+1)]))
for {
a := v_0
if v_1.Op != OpARM64MOVDconst {
}
v.reset(OpARM64SUB)
v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
- v0.AuxInt = int64ToAuxInt(log2(c + 1))
+ v0.AuxInt = int64ToAuxInt(log64(c + 1))
v0.AddArg2(x, x)
v.AddArg2(a, v0)
return true
}
// match: (MADD a (MOVDconst [c]) x)
// cond: c%3 == 0 && isPowerOfTwo64(c/3)
- // result: (SUBshiftLL a (SUBshiftLL <x.Type> x x [2]) [log2(c/3)])
+ // result: (SUBshiftLL a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)])
for {
a := v_0
if v_1.Op != OpARM64MOVDconst {
break
}
v.reset(OpARM64SUBshiftLL)
- v.AuxInt = int64ToAuxInt(log2(c / 3))
+ v.AuxInt = int64ToAuxInt(log64(c / 3))
v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
v0.AuxInt = int64ToAuxInt(2)
v0.AddArg2(x, x)
}
// match: (MADD a (MOVDconst [c]) x)
// cond: c%5 == 0 && isPowerOfTwo64(c/5)
- // result: (ADDshiftLL a (ADDshiftLL <x.Type> x x [2]) [log2(c/5)])
+ // result: (ADDshiftLL a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)])
for {
a := v_0
if v_1.Op != OpARM64MOVDconst {
break
}
v.reset(OpARM64ADDshiftLL)
- v.AuxInt = int64ToAuxInt(log2(c / 5))
+ v.AuxInt = int64ToAuxInt(log64(c / 5))
v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
v0.AuxInt = int64ToAuxInt(2)
v0.AddArg2(x, x)
}
// match: (MADD a (MOVDconst [c]) x)
// cond: c%7 == 0 && isPowerOfTwo64(c/7)
- // result: (SUBshiftLL a (SUBshiftLL <x.Type> x x [3]) [log2(c/7)])
+ // result: (SUBshiftLL a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)])
for {
a := v_0
if v_1.Op != OpARM64MOVDconst {
break
}
v.reset(OpARM64SUBshiftLL)
- v.AuxInt = int64ToAuxInt(log2(c / 7))
+ v.AuxInt = int64ToAuxInt(log64(c / 7))
v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
v0.AuxInt = int64ToAuxInt(3)
v0.AddArg2(x, x)
}
// match: (MADD a (MOVDconst [c]) x)
// cond: c%9 == 0 && isPowerOfTwo64(c/9)
- // result: (ADDshiftLL a (ADDshiftLL <x.Type> x x [3]) [log2(c/9)])
+ // result: (ADDshiftLL a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)])
for {
a := v_0
if v_1.Op != OpARM64MOVDconst {
break
}
v.reset(OpARM64ADDshiftLL)
- v.AuxInt = int64ToAuxInt(log2(c / 9))
+ v.AuxInt = int64ToAuxInt(log64(c / 9))
v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
v0.AuxInt = int64ToAuxInt(3)
v0.AddArg2(x, x)
}
// match: (MADDW a x (MOVDconst [c]))
// cond: isPowerOfTwo64(c)
- // result: (ADDshiftLL a x [log2(c)])
+ // result: (ADDshiftLL a x [log64(c)])
for {
a := v_0
x := v_1
break
}
v.reset(OpARM64ADDshiftLL)
- v.AuxInt = int64ToAuxInt(log2(c))
+ v.AuxInt = int64ToAuxInt(log64(c))
v.AddArg2(a, x)
return true
}
// match: (MADDW a x (MOVDconst [c]))
// cond: isPowerOfTwo64(c-1) && int32(c)>=3
- // result: (ADD a (ADDshiftLL <x.Type> x x [log2(c-1)]))
+ // result: (ADD a (ADDshiftLL <x.Type> x x [log64(c-1)]))
for {
a := v_0
x := v_1
}
v.reset(OpARM64ADD)
v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
- v0.AuxInt = int64ToAuxInt(log2(c - 1))
+ v0.AuxInt = int64ToAuxInt(log64(c - 1))
v0.AddArg2(x, x)
v.AddArg2(a, v0)
return true
}
// match: (MADDW a x (MOVDconst [c]))
// cond: isPowerOfTwo64(c+1) && int32(c)>=7
- // result: (SUB a (SUBshiftLL <x.Type> x x [log2(c+1)]))
+ // result: (SUB a (SUBshiftLL <x.Type> x x [log64(c+1)]))
for {
a := v_0
x := v_1
}
v.reset(OpARM64SUB)
v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
- v0.AuxInt = int64ToAuxInt(log2(c + 1))
+ v0.AuxInt = int64ToAuxInt(log64(c + 1))
v0.AddArg2(x, x)
v.AddArg2(a, v0)
return true
}
// match: (MADDW a x (MOVDconst [c]))
// cond: c%3 == 0 && isPowerOfTwo64(c/3) && is32Bit(c)
- // result: (SUBshiftLL a (SUBshiftLL <x.Type> x x [2]) [log2(c/3)])
+ // result: (SUBshiftLL a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)])
for {
a := v_0
x := v_1
break
}
v.reset(OpARM64SUBshiftLL)
- v.AuxInt = int64ToAuxInt(log2(c / 3))
+ v.AuxInt = int64ToAuxInt(log64(c / 3))
v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
v0.AuxInt = int64ToAuxInt(2)
v0.AddArg2(x, x)
}
// match: (MADDW a x (MOVDconst [c]))
// cond: c%5 == 0 && isPowerOfTwo64(c/5) && is32Bit(c)
- // result: (ADDshiftLL a (ADDshiftLL <x.Type> x x [2]) [log2(c/5)])
+ // result: (ADDshiftLL a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)])
for {
a := v_0
x := v_1
break
}
v.reset(OpARM64ADDshiftLL)
- v.AuxInt = int64ToAuxInt(log2(c / 5))
+ v.AuxInt = int64ToAuxInt(log64(c / 5))
v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
v0.AuxInt = int64ToAuxInt(2)
v0.AddArg2(x, x)
}
// match: (MADDW a x (MOVDconst [c]))
// cond: c%7 == 0 && isPowerOfTwo64(c/7) && is32Bit(c)
- // result: (SUBshiftLL a (SUBshiftLL <x.Type> x x [3]) [log2(c/7)])
+ // result: (SUBshiftLL a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)])
for {
a := v_0
x := v_1
break
}
v.reset(OpARM64SUBshiftLL)
- v.AuxInt = int64ToAuxInt(log2(c / 7))
+ v.AuxInt = int64ToAuxInt(log64(c / 7))
v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
v0.AuxInt = int64ToAuxInt(3)
v0.AddArg2(x, x)
}
// match: (MADDW a x (MOVDconst [c]))
// cond: c%9 == 0 && isPowerOfTwo64(c/9) && is32Bit(c)
- // result: (ADDshiftLL a (ADDshiftLL <x.Type> x x [3]) [log2(c/9)])
+ // result: (ADDshiftLL a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)])
for {
a := v_0
x := v_1
break
}
v.reset(OpARM64ADDshiftLL)
- v.AuxInt = int64ToAuxInt(log2(c / 9))
+ v.AuxInt = int64ToAuxInt(log64(c / 9))
v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
v0.AuxInt = int64ToAuxInt(3)
v0.AddArg2(x, x)
}
// match: (MADDW a (MOVDconst [c]) x)
// cond: isPowerOfTwo64(c)
- // result: (ADDshiftLL a x [log2(c)])
+ // result: (ADDshiftLL a x [log64(c)])
for {
a := v_0
if v_1.Op != OpARM64MOVDconst {
break
}
v.reset(OpARM64ADDshiftLL)
- v.AuxInt = int64ToAuxInt(log2(c))
+ v.AuxInt = int64ToAuxInt(log64(c))
v.AddArg2(a, x)
return true
}
// match: (MADDW a (MOVDconst [c]) x)
// cond: isPowerOfTwo64(c-1) && int32(c)>=3
- // result: (ADD a (ADDshiftLL <x.Type> x x [log2(c-1)]))
+ // result: (ADD a (ADDshiftLL <x.Type> x x [log64(c-1)]))
for {
a := v_0
if v_1.Op != OpARM64MOVDconst {
}
v.reset(OpARM64ADD)
v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
- v0.AuxInt = int64ToAuxInt(log2(c - 1))
+ v0.AuxInt = int64ToAuxInt(log64(c - 1))
v0.AddArg2(x, x)
v.AddArg2(a, v0)
return true
}
// match: (MADDW a (MOVDconst [c]) x)
// cond: isPowerOfTwo64(c+1) && int32(c)>=7
- // result: (SUB a (SUBshiftLL <x.Type> x x [log2(c+1)]))
+ // result: (SUB a (SUBshiftLL <x.Type> x x [log64(c+1)]))
for {
a := v_0
if v_1.Op != OpARM64MOVDconst {
}
v.reset(OpARM64SUB)
v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
- v0.AuxInt = int64ToAuxInt(log2(c + 1))
+ v0.AuxInt = int64ToAuxInt(log64(c + 1))
v0.AddArg2(x, x)
v.AddArg2(a, v0)
return true
}
// match: (MADDW a (MOVDconst [c]) x)
// cond: c%3 == 0 && isPowerOfTwo64(c/3) && is32Bit(c)
- // result: (SUBshiftLL a (SUBshiftLL <x.Type> x x [2]) [log2(c/3)])
+ // result: (SUBshiftLL a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)])
for {
a := v_0
if v_1.Op != OpARM64MOVDconst {
break
}
v.reset(OpARM64SUBshiftLL)
- v.AuxInt = int64ToAuxInt(log2(c / 3))
+ v.AuxInt = int64ToAuxInt(log64(c / 3))
v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
v0.AuxInt = int64ToAuxInt(2)
v0.AddArg2(x, x)
}
// match: (MADDW a (MOVDconst [c]) x)
// cond: c%5 == 0 && isPowerOfTwo64(c/5) && is32Bit(c)
- // result: (ADDshiftLL a (ADDshiftLL <x.Type> x x [2]) [log2(c/5)])
+ // result: (ADDshiftLL a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)])
for {
a := v_0
if v_1.Op != OpARM64MOVDconst {
break
}
v.reset(OpARM64ADDshiftLL)
- v.AuxInt = int64ToAuxInt(log2(c / 5))
+ v.AuxInt = int64ToAuxInt(log64(c / 5))
v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
v0.AuxInt = int64ToAuxInt(2)
v0.AddArg2(x, x)
}
// match: (MADDW a (MOVDconst [c]) x)
// cond: c%7 == 0 && isPowerOfTwo64(c/7) && is32Bit(c)
- // result: (SUBshiftLL a (SUBshiftLL <x.Type> x x [3]) [log2(c/7)])
+ // result: (SUBshiftLL a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)])
for {
a := v_0
if v_1.Op != OpARM64MOVDconst {
break
}
v.reset(OpARM64SUBshiftLL)
- v.AuxInt = int64ToAuxInt(log2(c / 7))
+ v.AuxInt = int64ToAuxInt(log64(c / 7))
v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
v0.AuxInt = int64ToAuxInt(3)
v0.AddArg2(x, x)
}
// match: (MADDW a (MOVDconst [c]) x)
// cond: c%9 == 0 && isPowerOfTwo64(c/9) && is32Bit(c)
- // result: (ADDshiftLL a (ADDshiftLL <x.Type> x x [3]) [log2(c/9)])
+ // result: (ADDshiftLL a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)])
for {
a := v_0
if v_1.Op != OpARM64MOVDconst {
break
}
v.reset(OpARM64ADDshiftLL)
- v.AuxInt = int64ToAuxInt(log2(c / 9))
+ v.AuxInt = int64ToAuxInt(log64(c / 9))
v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
v0.AuxInt = int64ToAuxInt(3)
v0.AddArg2(x, x)
}
// match: (MNEG x (MOVDconst [c]))
// cond: isPowerOfTwo64(c)
- // result: (NEG (SLLconst <x.Type> [log2(c)] x))
+ // result: (NEG (SLLconst <x.Type> [log64(c)] x))
for {
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
x := v_0
}
v.reset(OpARM64NEG)
v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
- v0.AuxInt = int64ToAuxInt(log2(c))
+ v0.AuxInt = int64ToAuxInt(log64(c))
v0.AddArg(x)
v.AddArg(v0)
return true
}
// match: (MNEG x (MOVDconst [c]))
// cond: isPowerOfTwo64(c-1) && c >= 3
- // result: (NEG (ADDshiftLL <x.Type> x x [log2(c-1)]))
+ // result: (NEG (ADDshiftLL <x.Type> x x [log64(c-1)]))
for {
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
x := v_0
}
v.reset(OpARM64NEG)
v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
- v0.AuxInt = int64ToAuxInt(log2(c - 1))
+ v0.AuxInt = int64ToAuxInt(log64(c - 1))
v0.AddArg2(x, x)
v.AddArg(v0)
return true
}
// match: (MNEG x (MOVDconst [c]))
// cond: isPowerOfTwo64(c+1) && c >= 7
- // result: (NEG (ADDshiftLL <x.Type> (NEG <x.Type> x) x [log2(c+1)]))
+ // result: (NEG (ADDshiftLL <x.Type> (NEG <x.Type> x) x [log64(c+1)]))
for {
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
x := v_0
}
v.reset(OpARM64NEG)
v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
- v0.AuxInt = int64ToAuxInt(log2(c + 1))
+ v0.AuxInt = int64ToAuxInt(log64(c + 1))
v1 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
v1.AddArg(x)
v0.AddArg2(v1, x)
}
// match: (MNEG x (MOVDconst [c]))
// cond: c%3 == 0 && isPowerOfTwo64(c/3)
- // result: (SLLconst <x.Type> [log2(c/3)] (SUBshiftLL <x.Type> x x [2]))
+ // result: (SLLconst <x.Type> [log64(c/3)] (SUBshiftLL <x.Type> x x [2]))
for {
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
x := v_0
}
v.reset(OpARM64SLLconst)
v.Type = x.Type
- v.AuxInt = int64ToAuxInt(log2(c / 3))
+ v.AuxInt = int64ToAuxInt(log64(c / 3))
v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
v0.AuxInt = int64ToAuxInt(2)
v0.AddArg2(x, x)
}
// match: (MNEG x (MOVDconst [c]))
// cond: c%5 == 0 && isPowerOfTwo64(c/5)
- // result: (NEG (SLLconst <x.Type> [log2(c/5)] (ADDshiftLL <x.Type> x x [2])))
+ // result: (NEG (SLLconst <x.Type> [log64(c/5)] (ADDshiftLL <x.Type> x x [2])))
for {
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
x := v_0
}
v.reset(OpARM64NEG)
v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
- v0.AuxInt = int64ToAuxInt(log2(c / 5))
+ v0.AuxInt = int64ToAuxInt(log64(c / 5))
v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
v1.AuxInt = int64ToAuxInt(2)
v1.AddArg2(x, x)
}
// match: (MNEG x (MOVDconst [c]))
// cond: c%7 == 0 && isPowerOfTwo64(c/7)
- // result: (SLLconst <x.Type> [log2(c/7)] (SUBshiftLL <x.Type> x x [3]))
+ // result: (SLLconst <x.Type> [log64(c/7)] (SUBshiftLL <x.Type> x x [3]))
for {
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
x := v_0
}
v.reset(OpARM64SLLconst)
v.Type = x.Type
- v.AuxInt = int64ToAuxInt(log2(c / 7))
+ v.AuxInt = int64ToAuxInt(log64(c / 7))
v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
v0.AuxInt = int64ToAuxInt(3)
v0.AddArg2(x, x)
}
// match: (MNEG x (MOVDconst [c]))
// cond: c%9 == 0 && isPowerOfTwo64(c/9)
- // result: (NEG (SLLconst <x.Type> [log2(c/9)] (ADDshiftLL <x.Type> x x [3])))
+ // result: (NEG (SLLconst <x.Type> [log64(c/9)] (ADDshiftLL <x.Type> x x [3])))
for {
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
x := v_0
}
v.reset(OpARM64NEG)
v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
- v0.AuxInt = int64ToAuxInt(log2(c / 9))
+ v0.AuxInt = int64ToAuxInt(log64(c / 9))
v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
v1.AuxInt = int64ToAuxInt(3)
v1.AddArg2(x, x)
}
// match: (MNEGW x (MOVDconst [c]))
// cond: isPowerOfTwo64(c)
- // result: (NEG (SLLconst <x.Type> [log2(c)] x))
+ // result: (NEG (SLLconst <x.Type> [log64(c)] x))
for {
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
x := v_0
}
v.reset(OpARM64NEG)
v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
- v0.AuxInt = int64ToAuxInt(log2(c))
+ v0.AuxInt = int64ToAuxInt(log64(c))
v0.AddArg(x)
v.AddArg(v0)
return true
}
// match: (MNEGW x (MOVDconst [c]))
// cond: isPowerOfTwo64(c-1) && int32(c) >= 3
- // result: (NEG (ADDshiftLL <x.Type> x x [log2(c-1)]))
+ // result: (NEG (ADDshiftLL <x.Type> x x [log64(c-1)]))
for {
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
x := v_0
}
v.reset(OpARM64NEG)
v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
- v0.AuxInt = int64ToAuxInt(log2(c - 1))
+ v0.AuxInt = int64ToAuxInt(log64(c - 1))
v0.AddArg2(x, x)
v.AddArg(v0)
return true
}
// match: (MNEGW x (MOVDconst [c]))
// cond: isPowerOfTwo64(c+1) && int32(c) >= 7
- // result: (NEG (ADDshiftLL <x.Type> (NEG <x.Type> x) x [log2(c+1)]))
+ // result: (NEG (ADDshiftLL <x.Type> (NEG <x.Type> x) x [log64(c+1)]))
for {
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
x := v_0
}
v.reset(OpARM64NEG)
v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
- v0.AuxInt = int64ToAuxInt(log2(c + 1))
+ v0.AuxInt = int64ToAuxInt(log64(c + 1))
v1 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
v1.AddArg(x)
v0.AddArg2(v1, x)
}
// match: (MNEGW x (MOVDconst [c]))
// cond: c%3 == 0 && isPowerOfTwo64(c/3) && is32Bit(c)
- // result: (SLLconst <x.Type> [log2(c/3)] (SUBshiftLL <x.Type> x x [2]))
+ // result: (SLLconst <x.Type> [log64(c/3)] (SUBshiftLL <x.Type> x x [2]))
for {
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
x := v_0
}
v.reset(OpARM64SLLconst)
v.Type = x.Type
- v.AuxInt = int64ToAuxInt(log2(c / 3))
+ v.AuxInt = int64ToAuxInt(log64(c / 3))
v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
v0.AuxInt = int64ToAuxInt(2)
v0.AddArg2(x, x)
}
// match: (MNEGW x (MOVDconst [c]))
// cond: c%5 == 0 && isPowerOfTwo64(c/5) && is32Bit(c)
- // result: (NEG (SLLconst <x.Type> [log2(c/5)] (ADDshiftLL <x.Type> x x [2])))
+ // result: (NEG (SLLconst <x.Type> [log64(c/5)] (ADDshiftLL <x.Type> x x [2])))
for {
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
x := v_0
}
v.reset(OpARM64NEG)
v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
- v0.AuxInt = int64ToAuxInt(log2(c / 5))
+ v0.AuxInt = int64ToAuxInt(log64(c / 5))
v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
v1.AuxInt = int64ToAuxInt(2)
v1.AddArg2(x, x)
}
// match: (MNEGW x (MOVDconst [c]))
// cond: c%7 == 0 && isPowerOfTwo64(c/7) && is32Bit(c)
- // result: (SLLconst <x.Type> [log2(c/7)] (SUBshiftLL <x.Type> x x [3]))
+ // result: (SLLconst <x.Type> [log64(c/7)] (SUBshiftLL <x.Type> x x [3]))
for {
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
x := v_0
}
v.reset(OpARM64SLLconst)
v.Type = x.Type
- v.AuxInt = int64ToAuxInt(log2(c / 7))
+ v.AuxInt = int64ToAuxInt(log64(c / 7))
v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
v0.AuxInt = int64ToAuxInt(3)
v0.AddArg2(x, x)
}
// match: (MNEGW x (MOVDconst [c]))
// cond: c%9 == 0 && isPowerOfTwo64(c/9) && is32Bit(c)
- // result: (NEG (SLLconst <x.Type> [log2(c/9)] (ADDshiftLL <x.Type> x x [3])))
+ // result: (NEG (SLLconst <x.Type> [log64(c/9)] (ADDshiftLL <x.Type> x x [3])))
for {
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
x := v_0
}
v.reset(OpARM64NEG)
v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
- v0.AuxInt = int64ToAuxInt(log2(c / 9))
+ v0.AuxInt = int64ToAuxInt(log64(c / 9))
v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
v1.AuxInt = int64ToAuxInt(3)
v1.AddArg2(x, x)
}
// match: (MSUB a x (MOVDconst [c]))
// cond: isPowerOfTwo64(c)
- // result: (SUBshiftLL a x [log2(c)])
+ // result: (SUBshiftLL a x [log64(c)])
for {
a := v_0
x := v_1
break
}
v.reset(OpARM64SUBshiftLL)
- v.AuxInt = int64ToAuxInt(log2(c))
+ v.AuxInt = int64ToAuxInt(log64(c))
v.AddArg2(a, x)
return true
}
// match: (MSUB a x (MOVDconst [c]))
// cond: isPowerOfTwo64(c-1) && c>=3
- // result: (SUB a (ADDshiftLL <x.Type> x x [log2(c-1)]))
+ // result: (SUB a (ADDshiftLL <x.Type> x x [log64(c-1)]))
for {
a := v_0
x := v_1
}
v.reset(OpARM64SUB)
v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
- v0.AuxInt = int64ToAuxInt(log2(c - 1))
+ v0.AuxInt = int64ToAuxInt(log64(c - 1))
v0.AddArg2(x, x)
v.AddArg2(a, v0)
return true
}
// match: (MSUB a x (MOVDconst [c]))
// cond: isPowerOfTwo64(c+1) && c>=7
- // result: (ADD a (SUBshiftLL <x.Type> x x [log2(c+1)]))
+ // result: (ADD a (SUBshiftLL <x.Type> x x [log64(c+1)]))
for {
a := v_0
x := v_1
}
v.reset(OpARM64ADD)
v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
- v0.AuxInt = int64ToAuxInt(log2(c + 1))
+ v0.AuxInt = int64ToAuxInt(log64(c + 1))
v0.AddArg2(x, x)
v.AddArg2(a, v0)
return true
}
// match: (MSUB a x (MOVDconst [c]))
// cond: c%3 == 0 && isPowerOfTwo64(c/3)
- // result: (ADDshiftLL a (SUBshiftLL <x.Type> x x [2]) [log2(c/3)])
+ // result: (ADDshiftLL a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)])
for {
a := v_0
x := v_1
break
}
v.reset(OpARM64ADDshiftLL)
- v.AuxInt = int64ToAuxInt(log2(c / 3))
+ v.AuxInt = int64ToAuxInt(log64(c / 3))
v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
v0.AuxInt = int64ToAuxInt(2)
v0.AddArg2(x, x)
}
// match: (MSUB a x (MOVDconst [c]))
// cond: c%5 == 0 && isPowerOfTwo64(c/5)
- // result: (SUBshiftLL a (ADDshiftLL <x.Type> x x [2]) [log2(c/5)])
+ // result: (SUBshiftLL a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)])
for {
a := v_0
x := v_1
break
}
v.reset(OpARM64SUBshiftLL)
- v.AuxInt = int64ToAuxInt(log2(c / 5))
+ v.AuxInt = int64ToAuxInt(log64(c / 5))
v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
v0.AuxInt = int64ToAuxInt(2)
v0.AddArg2(x, x)
}
// match: (MSUB a x (MOVDconst [c]))
// cond: c%7 == 0 && isPowerOfTwo64(c/7)
- // result: (ADDshiftLL a (SUBshiftLL <x.Type> x x [3]) [log2(c/7)])
+ // result: (ADDshiftLL a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)])
for {
a := v_0
x := v_1
break
}
v.reset(OpARM64ADDshiftLL)
- v.AuxInt = int64ToAuxInt(log2(c / 7))
+ v.AuxInt = int64ToAuxInt(log64(c / 7))
v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
v0.AuxInt = int64ToAuxInt(3)
v0.AddArg2(x, x)
}
// match: (MSUB a x (MOVDconst [c]))
// cond: c%9 == 0 && isPowerOfTwo64(c/9)
- // result: (SUBshiftLL a (ADDshiftLL <x.Type> x x [3]) [log2(c/9)])
+ // result: (SUBshiftLL a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)])
for {
a := v_0
x := v_1
break
}
v.reset(OpARM64SUBshiftLL)
- v.AuxInt = int64ToAuxInt(log2(c / 9))
+ v.AuxInt = int64ToAuxInt(log64(c / 9))
v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
v0.AuxInt = int64ToAuxInt(3)
v0.AddArg2(x, x)
}
// match: (MSUB a (MOVDconst [c]) x)
// cond: isPowerOfTwo64(c)
- // result: (SUBshiftLL a x [log2(c)])
+ // result: (SUBshiftLL a x [log64(c)])
for {
a := v_0
if v_1.Op != OpARM64MOVDconst {
break
}
v.reset(OpARM64SUBshiftLL)
- v.AuxInt = int64ToAuxInt(log2(c))
+ v.AuxInt = int64ToAuxInt(log64(c))
v.AddArg2(a, x)
return true
}
// match: (MSUB a (MOVDconst [c]) x)
// cond: isPowerOfTwo64(c-1) && c>=3
- // result: (SUB a (ADDshiftLL <x.Type> x x [log2(c-1)]))
+ // result: (SUB a (ADDshiftLL <x.Type> x x [log64(c-1)]))
for {
a := v_0
if v_1.Op != OpARM64MOVDconst {
}
v.reset(OpARM64SUB)
v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
- v0.AuxInt = int64ToAuxInt(log2(c - 1))
+ v0.AuxInt = int64ToAuxInt(log64(c - 1))
v0.AddArg2(x, x)
v.AddArg2(a, v0)
return true
}
// match: (MSUB a (MOVDconst [c]) x)
// cond: isPowerOfTwo64(c+1) && c>=7
- // result: (ADD a (SUBshiftLL <x.Type> x x [log2(c+1)]))
+ // result: (ADD a (SUBshiftLL <x.Type> x x [log64(c+1)]))
for {
a := v_0
if v_1.Op != OpARM64MOVDconst {
}
v.reset(OpARM64ADD)
v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
- v0.AuxInt = int64ToAuxInt(log2(c + 1))
+ v0.AuxInt = int64ToAuxInt(log64(c + 1))
v0.AddArg2(x, x)
v.AddArg2(a, v0)
return true
}
// match: (MSUB a (MOVDconst [c]) x)
// cond: c%3 == 0 && isPowerOfTwo64(c/3)
- // result: (ADDshiftLL a (SUBshiftLL <x.Type> x x [2]) [log2(c/3)])
+ // result: (ADDshiftLL a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)])
for {
a := v_0
if v_1.Op != OpARM64MOVDconst {
break
}
v.reset(OpARM64ADDshiftLL)
- v.AuxInt = int64ToAuxInt(log2(c / 3))
+ v.AuxInt = int64ToAuxInt(log64(c / 3))
v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
v0.AuxInt = int64ToAuxInt(2)
v0.AddArg2(x, x)
}
// match: (MSUB a (MOVDconst [c]) x)
// cond: c%5 == 0 && isPowerOfTwo64(c/5)
- // result: (SUBshiftLL a (ADDshiftLL <x.Type> x x [2]) [log2(c/5)])
+ // result: (SUBshiftLL a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)])
for {
a := v_0
if v_1.Op != OpARM64MOVDconst {
break
}
v.reset(OpARM64SUBshiftLL)
- v.AuxInt = int64ToAuxInt(log2(c / 5))
+ v.AuxInt = int64ToAuxInt(log64(c / 5))
v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
v0.AuxInt = int64ToAuxInt(2)
v0.AddArg2(x, x)
}
// match: (MSUB a (MOVDconst [c]) x)
// cond: c%7 == 0 && isPowerOfTwo64(c/7)
- // result: (ADDshiftLL a (SUBshiftLL <x.Type> x x [3]) [log2(c/7)])
+ // result: (ADDshiftLL a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)])
for {
a := v_0
if v_1.Op != OpARM64MOVDconst {
break
}
v.reset(OpARM64ADDshiftLL)
- v.AuxInt = int64ToAuxInt(log2(c / 7))
+ v.AuxInt = int64ToAuxInt(log64(c / 7))
v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
v0.AuxInt = int64ToAuxInt(3)
v0.AddArg2(x, x)
}
// match: (MSUB a (MOVDconst [c]) x)
// cond: c%9 == 0 && isPowerOfTwo64(c/9)
- // result: (SUBshiftLL a (ADDshiftLL <x.Type> x x [3]) [log2(c/9)])
+ // result: (SUBshiftLL a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)])
for {
a := v_0
if v_1.Op != OpARM64MOVDconst {
break
}
v.reset(OpARM64SUBshiftLL)
- v.AuxInt = int64ToAuxInt(log2(c / 9))
+ v.AuxInt = int64ToAuxInt(log64(c / 9))
v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
v0.AuxInt = int64ToAuxInt(3)
v0.AddArg2(x, x)
}
// match: (MSUBW a x (MOVDconst [c]))
// cond: isPowerOfTwo64(c)
- // result: (SUBshiftLL a x [log2(c)])
+ // result: (SUBshiftLL a x [log64(c)])
for {
a := v_0
x := v_1
break
}
v.reset(OpARM64SUBshiftLL)
- v.AuxInt = int64ToAuxInt(log2(c))
+ v.AuxInt = int64ToAuxInt(log64(c))
v.AddArg2(a, x)
return true
}
// match: (MSUBW a x (MOVDconst [c]))
// cond: isPowerOfTwo64(c-1) && int32(c)>=3
- // result: (SUB a (ADDshiftLL <x.Type> x x [log2(c-1)]))
+ // result: (SUB a (ADDshiftLL <x.Type> x x [log64(c-1)]))
for {
a := v_0
x := v_1
}
v.reset(OpARM64SUB)
v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
- v0.AuxInt = int64ToAuxInt(log2(c - 1))
+ v0.AuxInt = int64ToAuxInt(log64(c - 1))
v0.AddArg2(x, x)
v.AddArg2(a, v0)
return true
}
// match: (MSUBW a x (MOVDconst [c]))
// cond: isPowerOfTwo64(c+1) && int32(c)>=7
- // result: (ADD a (SUBshiftLL <x.Type> x x [log2(c+1)]))
+ // result: (ADD a (SUBshiftLL <x.Type> x x [log64(c+1)]))
for {
a := v_0
x := v_1
}
v.reset(OpARM64ADD)
v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
- v0.AuxInt = int64ToAuxInt(log2(c + 1))
+ v0.AuxInt = int64ToAuxInt(log64(c + 1))
v0.AddArg2(x, x)
v.AddArg2(a, v0)
return true
}
// match: (MSUBW a x (MOVDconst [c]))
// cond: c%3 == 0 && isPowerOfTwo64(c/3) && is32Bit(c)
- // result: (ADDshiftLL a (SUBshiftLL <x.Type> x x [2]) [log2(c/3)])
+ // result: (ADDshiftLL a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)])
for {
a := v_0
x := v_1
break
}
v.reset(OpARM64ADDshiftLL)
- v.AuxInt = int64ToAuxInt(log2(c / 3))
+ v.AuxInt = int64ToAuxInt(log64(c / 3))
v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
v0.AuxInt = int64ToAuxInt(2)
v0.AddArg2(x, x)
}
// match: (MSUBW a x (MOVDconst [c]))
// cond: c%5 == 0 && isPowerOfTwo64(c/5) && is32Bit(c)
- // result: (SUBshiftLL a (ADDshiftLL <x.Type> x x [2]) [log2(c/5)])
+ // result: (SUBshiftLL a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)])
for {
a := v_0
x := v_1
break
}
v.reset(OpARM64SUBshiftLL)
- v.AuxInt = int64ToAuxInt(log2(c / 5))
+ v.AuxInt = int64ToAuxInt(log64(c / 5))
v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
v0.AuxInt = int64ToAuxInt(2)
v0.AddArg2(x, x)
}
// match: (MSUBW a x (MOVDconst [c]))
// cond: c%7 == 0 && isPowerOfTwo64(c/7) && is32Bit(c)
- // result: (ADDshiftLL a (SUBshiftLL <x.Type> x x [3]) [log2(c/7)])
+ // result: (ADDshiftLL a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)])
for {
a := v_0
x := v_1
break
}
v.reset(OpARM64ADDshiftLL)
- v.AuxInt = int64ToAuxInt(log2(c / 7))
+ v.AuxInt = int64ToAuxInt(log64(c / 7))
v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
v0.AuxInt = int64ToAuxInt(3)
v0.AddArg2(x, x)
}
// match: (MSUBW a x (MOVDconst [c]))
// cond: c%9 == 0 && isPowerOfTwo64(c/9) && is32Bit(c)
- // result: (SUBshiftLL a (ADDshiftLL <x.Type> x x [3]) [log2(c/9)])
+ // result: (SUBshiftLL a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)])
for {
a := v_0
x := v_1
break
}
v.reset(OpARM64SUBshiftLL)
- v.AuxInt = int64ToAuxInt(log2(c / 9))
+ v.AuxInt = int64ToAuxInt(log64(c / 9))
v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
v0.AuxInt = int64ToAuxInt(3)
v0.AddArg2(x, x)
}
// match: (MSUBW a (MOVDconst [c]) x)
// cond: isPowerOfTwo64(c)
- // result: (SUBshiftLL a x [log2(c)])
+ // result: (SUBshiftLL a x [log64(c)])
for {
a := v_0
if v_1.Op != OpARM64MOVDconst {
break
}
v.reset(OpARM64SUBshiftLL)
- v.AuxInt = int64ToAuxInt(log2(c))
+ v.AuxInt = int64ToAuxInt(log64(c))
v.AddArg2(a, x)
return true
}
// match: (MSUBW a (MOVDconst [c]) x)
// cond: isPowerOfTwo64(c-1) && int32(c)>=3
- // result: (SUB a (ADDshiftLL <x.Type> x x [log2(c-1)]))
+ // result: (SUB a (ADDshiftLL <x.Type> x x [log64(c-1)]))
for {
a := v_0
if v_1.Op != OpARM64MOVDconst {
}
v.reset(OpARM64SUB)
v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
- v0.AuxInt = int64ToAuxInt(log2(c - 1))
+ v0.AuxInt = int64ToAuxInt(log64(c - 1))
v0.AddArg2(x, x)
v.AddArg2(a, v0)
return true
}
// match: (MSUBW a (MOVDconst [c]) x)
// cond: isPowerOfTwo64(c+1) && int32(c)>=7
- // result: (ADD a (SUBshiftLL <x.Type> x x [log2(c+1)]))
+ // result: (ADD a (SUBshiftLL <x.Type> x x [log64(c+1)]))
for {
a := v_0
if v_1.Op != OpARM64MOVDconst {
}
v.reset(OpARM64ADD)
v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
- v0.AuxInt = int64ToAuxInt(log2(c + 1))
+ v0.AuxInt = int64ToAuxInt(log64(c + 1))
v0.AddArg2(x, x)
v.AddArg2(a, v0)
return true
}
// match: (MSUBW a (MOVDconst [c]) x)
// cond: c%3 == 0 && isPowerOfTwo64(c/3) && is32Bit(c)
- // result: (ADDshiftLL a (SUBshiftLL <x.Type> x x [2]) [log2(c/3)])
+ // result: (ADDshiftLL a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)])
for {
a := v_0
if v_1.Op != OpARM64MOVDconst {
break
}
v.reset(OpARM64ADDshiftLL)
- v.AuxInt = int64ToAuxInt(log2(c / 3))
+ v.AuxInt = int64ToAuxInt(log64(c / 3))
v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
v0.AuxInt = int64ToAuxInt(2)
v0.AddArg2(x, x)
}
// match: (MSUBW a (MOVDconst [c]) x)
// cond: c%5 == 0 && isPowerOfTwo64(c/5) && is32Bit(c)
- // result: (SUBshiftLL a (ADDshiftLL <x.Type> x x [2]) [log2(c/5)])
+ // result: (SUBshiftLL a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)])
for {
a := v_0
if v_1.Op != OpARM64MOVDconst {
break
}
v.reset(OpARM64SUBshiftLL)
- v.AuxInt = int64ToAuxInt(log2(c / 5))
+ v.AuxInt = int64ToAuxInt(log64(c / 5))
v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
v0.AuxInt = int64ToAuxInt(2)
v0.AddArg2(x, x)
}
// match: (MSUBW a (MOVDconst [c]) x)
// cond: c%7 == 0 && isPowerOfTwo64(c/7) && is32Bit(c)
- // result: (ADDshiftLL a (SUBshiftLL <x.Type> x x [3]) [log2(c/7)])
+ // result: (ADDshiftLL a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)])
for {
a := v_0
if v_1.Op != OpARM64MOVDconst {
break
}
v.reset(OpARM64ADDshiftLL)
- v.AuxInt = int64ToAuxInt(log2(c / 7))
+ v.AuxInt = int64ToAuxInt(log64(c / 7))
v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
v0.AuxInt = int64ToAuxInt(3)
v0.AddArg2(x, x)
}
// match: (MSUBW a (MOVDconst [c]) x)
// cond: c%9 == 0 && isPowerOfTwo64(c/9) && is32Bit(c)
- // result: (SUBshiftLL a (ADDshiftLL <x.Type> x x [3]) [log2(c/9)])
+ // result: (SUBshiftLL a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)])
for {
a := v_0
if v_1.Op != OpARM64MOVDconst {
break
}
v.reset(OpARM64SUBshiftLL)
- v.AuxInt = int64ToAuxInt(log2(c / 9))
+ v.AuxInt = int64ToAuxInt(log64(c / 9))
v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
v0.AuxInt = int64ToAuxInt(3)
v0.AddArg2(x, x)
}
// match: (MUL x (MOVDconst [c]))
// cond: isPowerOfTwo64(c)
- // result: (SLLconst [log2(c)] x)
+ // result: (SLLconst [log64(c)] x)
for {
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
x := v_0
continue
}
v.reset(OpARM64SLLconst)
- v.AuxInt = int64ToAuxInt(log2(c))
+ v.AuxInt = int64ToAuxInt(log64(c))
v.AddArg(x)
return true
}
}
// match: (MUL x (MOVDconst [c]))
// cond: isPowerOfTwo64(c-1) && c >= 3
- // result: (ADDshiftLL x x [log2(c-1)])
+ // result: (ADDshiftLL x x [log64(c-1)])
for {
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
x := v_0
continue
}
v.reset(OpARM64ADDshiftLL)
- v.AuxInt = int64ToAuxInt(log2(c - 1))
+ v.AuxInt = int64ToAuxInt(log64(c - 1))
v.AddArg2(x, x)
return true
}
}
// match: (MUL x (MOVDconst [c]))
// cond: isPowerOfTwo64(c+1) && c >= 7
- // result: (ADDshiftLL (NEG <x.Type> x) x [log2(c+1)])
+ // result: (ADDshiftLL (NEG <x.Type> x) x [log64(c+1)])
for {
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
x := v_0
continue
}
v.reset(OpARM64ADDshiftLL)
- v.AuxInt = int64ToAuxInt(log2(c + 1))
+ v.AuxInt = int64ToAuxInt(log64(c + 1))
v0 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
v0.AddArg(x)
v.AddArg2(v0, x)
}
// match: (MUL x (MOVDconst [c]))
// cond: c%3 == 0 && isPowerOfTwo64(c/3)
- // result: (SLLconst [log2(c/3)] (ADDshiftLL <x.Type> x x [1]))
+ // result: (SLLconst [log64(c/3)] (ADDshiftLL <x.Type> x x [1]))
for {
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
x := v_0
continue
}
v.reset(OpARM64SLLconst)
- v.AuxInt = int64ToAuxInt(log2(c / 3))
+ v.AuxInt = int64ToAuxInt(log64(c / 3))
v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
v0.AuxInt = int64ToAuxInt(1)
v0.AddArg2(x, x)
}
// match: (MUL x (MOVDconst [c]))
// cond: c%5 == 0 && isPowerOfTwo64(c/5)
- // result: (SLLconst [log2(c/5)] (ADDshiftLL <x.Type> x x [2]))
+ // result: (SLLconst [log64(c/5)] (ADDshiftLL <x.Type> x x [2]))
for {
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
x := v_0
continue
}
v.reset(OpARM64SLLconst)
- v.AuxInt = int64ToAuxInt(log2(c / 5))
+ v.AuxInt = int64ToAuxInt(log64(c / 5))
v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
v0.AuxInt = int64ToAuxInt(2)
v0.AddArg2(x, x)
}
// match: (MUL x (MOVDconst [c]))
// cond: c%7 == 0 && isPowerOfTwo64(c/7)
- // result: (SLLconst [log2(c/7)] (ADDshiftLL <x.Type> (NEG <x.Type> x) x [3]))
+ // result: (SLLconst [log64(c/7)] (ADDshiftLL <x.Type> (NEG <x.Type> x) x [3]))
for {
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
x := v_0
continue
}
v.reset(OpARM64SLLconst)
- v.AuxInt = int64ToAuxInt(log2(c / 7))
+ v.AuxInt = int64ToAuxInt(log64(c / 7))
v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
v0.AuxInt = int64ToAuxInt(3)
v1 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
}
// match: (MUL x (MOVDconst [c]))
// cond: c%9 == 0 && isPowerOfTwo64(c/9)
- // result: (SLLconst [log2(c/9)] (ADDshiftLL <x.Type> x x [3]))
+ // result: (SLLconst [log64(c/9)] (ADDshiftLL <x.Type> x x [3]))
for {
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
x := v_0
continue
}
v.reset(OpARM64SLLconst)
- v.AuxInt = int64ToAuxInt(log2(c / 9))
+ v.AuxInt = int64ToAuxInt(log64(c / 9))
v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
v0.AuxInt = int64ToAuxInt(3)
v0.AddArg2(x, x)
}
// match: (MULW x (MOVDconst [c]))
// cond: isPowerOfTwo64(c)
- // result: (SLLconst [log2(c)] x)
+ // result: (SLLconst [log64(c)] x)
for {
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
x := v_0
continue
}
v.reset(OpARM64SLLconst)
- v.AuxInt = int64ToAuxInt(log2(c))
+ v.AuxInt = int64ToAuxInt(log64(c))
v.AddArg(x)
return true
}
}
// match: (MULW x (MOVDconst [c]))
// cond: isPowerOfTwo64(c-1) && int32(c) >= 3
- // result: (ADDshiftLL x x [log2(c-1)])
+ // result: (ADDshiftLL x x [log64(c-1)])
for {
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
x := v_0
continue
}
v.reset(OpARM64ADDshiftLL)
- v.AuxInt = int64ToAuxInt(log2(c - 1))
+ v.AuxInt = int64ToAuxInt(log64(c - 1))
v.AddArg2(x, x)
return true
}
}
// match: (MULW x (MOVDconst [c]))
// cond: isPowerOfTwo64(c+1) && int32(c) >= 7
- // result: (ADDshiftLL (NEG <x.Type> x) x [log2(c+1)])
+ // result: (ADDshiftLL (NEG <x.Type> x) x [log64(c+1)])
for {
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
x := v_0
continue
}
v.reset(OpARM64ADDshiftLL)
- v.AuxInt = int64ToAuxInt(log2(c + 1))
+ v.AuxInt = int64ToAuxInt(log64(c + 1))
v0 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
v0.AddArg(x)
v.AddArg2(v0, x)
}
// match: (MULW x (MOVDconst [c]))
// cond: c%3 == 0 && isPowerOfTwo64(c/3) && is32Bit(c)
- // result: (SLLconst [log2(c/3)] (ADDshiftLL <x.Type> x x [1]))
+ // result: (SLLconst [log64(c/3)] (ADDshiftLL <x.Type> x x [1]))
for {
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
x := v_0
continue
}
v.reset(OpARM64SLLconst)
- v.AuxInt = int64ToAuxInt(log2(c / 3))
+ v.AuxInt = int64ToAuxInt(log64(c / 3))
v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
v0.AuxInt = int64ToAuxInt(1)
v0.AddArg2(x, x)
}
// match: (MULW x (MOVDconst [c]))
// cond: c%5 == 0 && isPowerOfTwo64(c/5) && is32Bit(c)
- // result: (SLLconst [log2(c/5)] (ADDshiftLL <x.Type> x x [2]))
+ // result: (SLLconst [log64(c/5)] (ADDshiftLL <x.Type> x x [2]))
for {
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
x := v_0
continue
}
v.reset(OpARM64SLLconst)
- v.AuxInt = int64ToAuxInt(log2(c / 5))
+ v.AuxInt = int64ToAuxInt(log64(c / 5))
v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
v0.AuxInt = int64ToAuxInt(2)
v0.AddArg2(x, x)
}
// match: (MULW x (MOVDconst [c]))
// cond: c%7 == 0 && isPowerOfTwo64(c/7) && is32Bit(c)
- // result: (SLLconst [log2(c/7)] (ADDshiftLL <x.Type> (NEG <x.Type> x) x [3]))
+ // result: (SLLconst [log64(c/7)] (ADDshiftLL <x.Type> (NEG <x.Type> x) x [3]))
for {
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
x := v_0
continue
}
v.reset(OpARM64SLLconst)
- v.AuxInt = int64ToAuxInt(log2(c / 7))
+ v.AuxInt = int64ToAuxInt(log64(c / 7))
v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
v0.AuxInt = int64ToAuxInt(3)
v1 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
}
// match: (MULW x (MOVDconst [c]))
// cond: c%9 == 0 && isPowerOfTwo64(c/9) && is32Bit(c)
- // result: (SLLconst [log2(c/9)] (ADDshiftLL <x.Type> x x [3]))
+ // result: (SLLconst [log64(c/9)] (ADDshiftLL <x.Type> x x [3]))
for {
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
x := v_0
continue
}
v.reset(OpARM64SLLconst)
- v.AuxInt = int64ToAuxInt(log2(c / 9))
+ v.AuxInt = int64ToAuxInt(log64(c / 9))
v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
v0.AuxInt = int64ToAuxInt(3)
v0.AddArg2(x, x)
}
// match: (UDIV x (MOVDconst [c]))
// cond: isPowerOfTwo64(c)
- // result: (SRLconst [log2(c)] x)
+ // result: (SRLconst [log64(c)] x)
for {
x := v_0
if v_1.Op != OpARM64MOVDconst {
break
}
v.reset(OpARM64SRLconst)
- v.AuxInt = int64ToAuxInt(log2(c))
+ v.AuxInt = int64ToAuxInt(log64(c))
v.AddArg(x)
return true
}
}
// match: (UDIVW x (MOVDconst [c]))
// cond: isPowerOfTwo64(c) && is32Bit(c)
- // result: (SRLconst [log2(c)] x)
+ // result: (SRLconst [log64(c)] x)
for {
x := v_0
if v_1.Op != OpARM64MOVDconst {
break
}
v.reset(OpARM64SRLconst)
- v.AuxInt = int64ToAuxInt(log2(c))
+ v.AuxInt = int64ToAuxInt(log64(c))
v.AddArg(x)
return true
}