diff options
author | Jakub Jelinek <jakub@redhat.com> | 2020-01-30 09:39:05 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2020-01-30 09:39:05 +0100 |
commit | b285bebe6ad1e9f6416f0eb6cb69edc44db7813c (patch) | |
tree | 28a294b50851fef478ce7d6a189f210086bc0686 /gcc/tree-pretty-print.c | |
parent | 2595f25cdaf4f16d04a1078a487b2ecc126cae29 (diff) | |
download | gcc-b285bebe6ad1e9f6416f0eb6cb69edc44db7813c.zip gcc-b285bebe6ad1e9f6416f0eb6cb69edc44db7813c.tar.gz gcc-b285bebe6ad1e9f6416f0eb6cb69edc44db7813c.tar.bz2 |
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 <jakub@redhat.com>
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.
Diffstat (limited to 'gcc/tree-pretty-print.c')
0 files changed, 0 insertions, 0 deletions