aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2020-06-05 10:44:23 +0200
committerJakub Jelinek <jakub@redhat.com>2020-06-05 10:44:23 +0200
commit892b51cb73f24157391cd18c2215e8d703af97e7 (patch)
tree5af3103be0686d948e27665b20706a2d9d1d0189 /gcc/expr.c
parent6ea6c4978111d146db8d33c80d9da93d7bd2bc8d (diff)
downloadgcc-892b51cb73f24157391cd18c2215e8d703af97e7.zip
gcc-892b51cb73f24157391cd18c2215e8d703af97e7.tar.gz
gcc-892b51cb73f24157391cd18c2215e8d703af97e7.tar.bz2
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.
Diffstat (limited to 'gcc/expr.c')
0 files changed, 0 insertions, 0 deletions