[InstSimplify] Transform X * Y % Y --> 0
simplifyDiv already handles the case X * Y / Y --> X (barring overflow). This adds the equivalent handling to simplifyRem. Correctness: https://alive2.llvm.org/ce/z/J2cUbS https://alive2.llvm.org/ce/z/us9NUM https://alive2.llvm.org/ce/z/AvaDGJ https://alive2.llvm.org/ce/z/kq9ige Extending the situations in which we apply this transform would not be correct: https://alive2.llvm.org/ce/z/Lf9V63 https://alive2.llvm.org/ce/z/6RPQK3 https://alive2.llvm.org/ce/z/p9UdxC https://alive2.llvm.org/ce/z/A2zlhE https://alive2.llvm.org/ce/z/vHTtLw https://alive2.llvm.org/ce/z/lvpH42 Differential Revision: https://reviews.llvm.org/D102864
Loading
Please sign in to comment