https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91824
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jakub Jelinek <[email protected]>: https://gcc.gnu.org/g:b285bebe6ad1e9f6416f0eb6cb69edc44db7813c commit r10-6345-gb285bebe6ad1e9f6416f0eb6cb69edc44db7813c Author: Jakub Jelinek <[email protected]> Date: Thu Jan 30 09:39:05 2020 +0100 i386: Optimize popcnt followed by zero/sign extension [PR91824] Like any other instruction with 32-bit GPR destination operand in 64-bit mode, popcntl also clears the upper 32 bits of the register (and other bits too, it can return only 0 to 32 inclusive). During combine, the zero or sign extensions of it show up as paradoxical subreg of the popcount & 63, there 63 is the smallest power of two - 1 mask that can represent all the 0 to 32 inclusive values. 2020-01-30 Jakub Jelinek <[email protected]> PR target/91824 * config/i386/i386.md (*popcountsi2_zext): New define_insn_and_split. (*popcountsi2_zext_falsedep): New define_insn. * gcc.target/i386/pr91824-1.c: New test.
