https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94802
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jakub Jelinek <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:d2eb616a0f7bea78164912aa438c29fe1ef5774a commit r11-6378-gd2eb616a0f7bea78164912aa438c29fe1ef5774a Author: Jakub Jelinek <ja...@redhat.com> Date: Thu Dec 31 11:09:26 2020 +0100 match.pd: Add clz(X) == 0 -> (int)X < 0 etc. simpifications [PR94802] The following patch adds some clz simplifications. If clz is 0, then the MSB of the argument is set, and if clz is prec-1, then the argument is 1. 2020-12-31 Jakub Jelinek <ja...@redhat.com> PR tree-optimization/94802 * match.pd (clz(X) == 0 -> (int)X < 0): New simplification. (clz(X) == (prec-1) -> X == 1): Likewise. * gcc.dg/tree-ssa/pr94802-1.c: New test.