The existing logic in foldICmpMulConstant can only optimize the
constant if we have (X * Y) * C. However, reassociate pass currently
produces this form with the constant on the inner multiply, so let's
reassociate it in foldICmpMulConstant to enable further optimizations.
Related issue: https://github.com/llvm/llvm-project/issues/61538
Signed-off-by: Jun Zhang <jun@junz.org>
Add some tests for the shl case. Better yet split adding the shl logic to a follow up patch.