]> git.ipfire.org Git - thirdparty/gcc.git/commit
i386: Improve SImode constant - __builtin_clzll for -mno-lzcnt
authorH.J. Lu <hjl.tools@gmail.com>
Sun, 1 Aug 2021 16:55:33 +0000 (09:55 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Sun, 1 Aug 2021 20:32:55 +0000 (13:32 -0700)
commit6f0c43e97825ee54e3779afbedcd0def12443001
tree96c88229bdbe88003206abe51a0803d7d5f99843
parent8dd16447343890091874c9f588a7fea8c840cf77
i386: Improve SImode constant - __builtin_clzll for -mno-lzcnt

Add a zero_extend patten for bsr_rex64_1 and use it to split SImode
constant - __builtin_clzll to avoid unncessary zero_extend.

gcc/

PR target/78103
* config/i386/i386.md (bsr_rex64_1_zext): New.
(combine splitter for constant - clzll): Replace gen_bsr_rex64_1
with gen_bsr_rex64_1_zext.

gcc/testsuite/

PR target/78103
* gcc.target/i386/pr78103-2.c: Also scan incl.
* gcc.target/i386/pr78103-3.c: Scan leal|addl|incl for x32.  Also
scan incq.
gcc/config/i386/i386.md
gcc/testsuite/gcc.target/i386/pr78103-2.c
gcc/testsuite/gcc.target/i386/pr78103-3.c