https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95433
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Marc Glisse <gli...@gcc.gnu.org>: https://gcc.gnu.org/g:ca2b8c082c4f16919071c9f8de8db0b33b54c405 commit r11-2550-gca2b8c082c4f16919071c9f8de8db0b33b54c405 Author: Marc Glisse <marc.gli...@inria.fr> Date: Tue Aug 4 17:30:16 2020 +0200 Simplify X * C1 == C2 with undefined overflow this transformation is quite straightforward, without overflow, 3*X==15 is the same as X==5 and 3*X==5 cannot happen. Adding a single_use restriction for the first case didn't seem necessary, although of course it can slightly increase register pressure in some cases. 2020-08-04 Marc Glisse <marc.gli...@inria.fr> PR tree-optimization/95433 * match.pd (X * C1 == C2): New transformation. * gcc.c-torture/execute/pr23135.c: Add -fwrapv to avoid undefined behavior. * gcc.dg/tree-ssa/pr95433.c: New file.