[InstCombine] fold X*X == 0 --> X == 0
This is safe when the mul does not overflow: https://alive2.llvm.org/ce/z/LedVVP This could be extended to handle non-zero compare constants and non-squared multiplies.
Loading
Please sign in to comment
This is safe when the mul does not overflow: https://alive2.llvm.org/ce/z/LedVVP This could be extended to handle non-zero compare constants and non-squared multiplies.