Below Java code patterns
int c = a * (-b);
int d = (-a) * b;
long p = m * (-n);
long q = (-m) * n;
generates code like
0x0000ffff88ae66d4: neg w10, w2
0x0000ffff88ae66d8: mul w0, w1, w10
OR
0x0000ffff88ae66d4: neg x10, x2
0x0000ffff88ae66d8: mul x0, x1, x10
The neg & mul instructions can be combined into one single mneg instruction like
mneg w0, w1, w2
OR
mneg x0, x1, x2
int c = a * (-b);
int d = (-a) * b;
long p = m * (-n);
long q = (-m) * n;
generates code like
0x0000ffff88ae66d4: neg w10, w2
0x0000ffff88ae66d8: mul w0, w1, w10
OR
0x0000ffff88ae66d4: neg x10, x2
0x0000ffff88ae66d8: mul x0, x1, x10
The neg & mul instructions can be combined into one single mneg instruction like
mneg w0, w1, w2
OR
mneg x0, x1, x2