[Bug target/95535] Failure to optimize out cdqe after __bultin_ctz
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Jun 5 08:45:05 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95535
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:892b51cb73f24157391cd18c2215e8d703af97e7
commit r11-965-g892b51cb73f24157391cd18c2215e8d703af97e7
Author: Jakub Jelinek <jakub@redhat.com>
Date: Fri Jun 5 10:44:23 2020 +0200
ix86: Improve __builtin_c[lt]z followed by extension [PR95535]
In January I've added patterns to optimize SImode -> DImode sign or zero
extension of __builtin_popcount, this patch does the same for
__builtin_c[lt]z. Like most other instructions, the [tl]zcntl instructions
clear the upper 32 bits of the destination register and as the instructions
only result in values 0 to 32 inclusive, both sign and zero extensions
behave the same.
2020-06-05 Jakub Jelinek <jakub@redhat.com>
PR target/95535
* config/i386/i386.md (*ctzsi2_zext, *clzsi2_lzcnt_zext): New
define_insn_and_split patterns.
(*ctzsi2_zext_falsedep, *clzsi2_lzcnt_zext_falsedep): New
define_insn patterns.
* gcc.target/i386/pr95535-1.c: New test.
* gcc.target/i386/pr95535-2.c: New test.
More information about the Gcc-bugs
mailing list