Enabled folding optimization that was previously disabled by being incorrect.
To preserve correctness mul's operand that is not compared with zero in select's condition is now frozen.
Related bug: https://bugs.llvm.org/show_bug.cgi?id=51286
Correctness:
https://alive2.llvm.org/ce/z/bHef7J
https://alive2.llvm.org/ce/z/QcR7sf
https://alive2.llvm.org/ce/z/vvBLzt
https://alive2.llvm.org/ce/z/jGDXgq
https://alive2.llvm.org/ce/z/3Pe8Z4
https://alive2.llvm.org/ce/z/LGga8M
https://alive2.llvm.org/ce/z/CTG5fs
Why match an arbitrary constant if this pattern requires a zero constant? Use m_Zero() or some variation of that.